Add a TODO

This commit is contained in:
Clownacy 2020-04-21 15:23:20 +01:00
parent bfc2d4e326
commit b4d9b15a9c

View file

@ -519,6 +519,7 @@ static void GlyphBatch_DestroyTexture(SPRITEBATCH_U64 texture_id, void *udata)
GLuint gl_texture_id = (GLuint)texture_id; GLuint gl_texture_id = (GLuint)texture_id;
// Flush the vertex buffer if we're about to destroy its texture // Flush the vertex buffer if we're about to destroy its texture
// TODO - This leaves `last_source_texture`/`last_destination_texture` dangling
if (gl_texture_id == last_source_texture || gl_texture_id == last_destination_texture) if (gl_texture_id == last_source_texture || gl_texture_id == last_destination_texture)
FlushVertexBuffer(); FlushVertexBuffer();
@ -847,6 +848,7 @@ void RenderBackend_FreeSurface(RenderBackend_Surface *surface)
return; return;
// Flush the vertex buffer if we're about to destroy its texture // Flush the vertex buffer if we're about to destroy its texture
// TODO - This leaves `last_source_texture`/`last_destination_texture` dangling
if (surface->texture_id == last_source_texture || surface->texture_id == last_destination_texture) if (surface->texture_id == last_source_texture || surface->texture_id == last_destination_texture)
FlushVertexBuffer(); FlushVertexBuffer();