mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 09:54:10 +03:00
Don't draw texture onto itself for scrolling
Drawing a texture onto itself seems to produce issues on Metal. To fix this, use a temporary texture instead, that then gets drawn onto the original texture. Fixes #927.
This commit is contained in:
@@ -162,7 +162,7 @@ public:
|
||||
void draw_sprite(int x, int y, int t, int r, int g, int b);
|
||||
void draw_sprite(int x, int y, int t, SDL_Color color);
|
||||
|
||||
void scroll_texture(SDL_Texture* texture, int x, int y);
|
||||
void scroll_texture(SDL_Texture* texture, SDL_Texture* temp, int x, int y);
|
||||
|
||||
void printcrewname(int x, int y, int t);
|
||||
void printcrewnamedark(int x, int y, int t);
|
||||
@@ -314,6 +314,7 @@ public:
|
||||
SDL_Texture* ghostTexture;
|
||||
SDL_Texture* backgroundTexture;
|
||||
SDL_Texture* foregroundTexture;
|
||||
SDL_Texture* tempScrollingTexture;
|
||||
|
||||
TowerBG towerbg;
|
||||
TowerBG titlebg;
|
||||
|
||||
Reference in New Issue
Block a user