Skip to content

Commit f0f275c

Browse files
authored
Merge pull request #389 from Gusgo99/fix_update_sprite_function
Fix Decal::UpdateSprite function
2 parents b450c6a + b650cbe commit f0f275c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

olcPixelGameEngine.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5679,7 +5679,7 @@ namespace olc
56795679

56805680
void ReadTexture(uint32_t id, olc::Sprite* spr) override
56815681
{
5682-
glReadPixels(0, 0, spr->width, spr->height, GL_RGBA, GL_UNSIGNED_BYTE, spr->GetData());
5682+
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, spr->GetData());
56835683
}
56845684

56855685
void ApplyTexture(uint32_t id) override
@@ -6269,7 +6269,7 @@ namespace olc
62696269

62706270
void ReadTexture(uint32_t id, olc::Sprite* spr) override
62716271
{
6272-
glReadPixels(0, 0, spr->width, spr->height, GL_RGBA, GL_UNSIGNED_BYTE, spr->GetData());
6272+
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, spr->GetData());
62736273
}
62746274

62756275
void ApplyTexture(uint32_t id) override

0 commit comments

Comments
 (0)