destroy all textures on window destruction and restore OpenGL objects when Android resumes the app
This commit is contained in:
@@ -25,6 +25,11 @@ Texture2D& TextureManager::get(uint16_t id)
|
||||
return m_textures[id];
|
||||
}
|
||||
|
||||
void TextureManager::invalidate()
|
||||
{
|
||||
m_textures.clear();
|
||||
}
|
||||
|
||||
bool Texture2D::create(int width, int height, GLint internal_format, GLint format, const uint8_t* data)
|
||||
{
|
||||
m_width = width;
|
||||
|
||||
Reference in New Issue
Block a user