gpu errors

This commit is contained in:
2026-05-02 21:56:33 +02:00
parent fcc598adb1
commit c46443e2f4
6 changed files with 103 additions and 4 deletions

View File

@@ -17,11 +17,16 @@ namespace Game::Renderer {
// Build the texture for the font; Call getSDLTexture() afterwards
void build(SDL_Color color, std::string text);
// Rebuild GPU-backed texture after a renderer/device reset
bool reload(SDL_Renderer* renderer);
SDL_Texture* getSDLTexture();
std::string getId();
private:
TTF_Font* mFont;
SDL_Renderer* mRenderer;
// Remember last build params so we can rebuild fonts on device reset
std::string mLastText;
SDL_Color mLastColor;
};
}