Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GUI2/Canvas: optimized cached texture management
Instead of throwing out the cached texture every time the canvas was dirty, I've added a flag so that only happens if its size has actually changed. There still seem to be some issues in GUI2 where canvas objects keep getting reset, but I'm not sure why. Will have to look into that. Anyway, the addition of the SDL_RenderClear call also seems to have fixed the weird graphics bleed-through I was getting when running the game with the OGL driver. I don't know if the canvas copy or move ctors are needed for anything. I added them for a test, but I'll leave them for now in case I need them later.
- Loading branch information
Showing
2 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters