Commit 64ad03ab authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko Committed by Adrien Plazas

gl-display: Call glBindTexture() on every frame

glBindTexture() changes global state, so if anything else uses OpenGL
textures, it also corrupts RetroGLDisplay state. Calling it every time
in retro_gl_display_load_texture() ensures that we're always working with
the right texture.
parent 28616a0b
......@@ -125,6 +125,8 @@ retro_gl_display_load_texture (RetroGLDisplay *self,
gint *texture_width,
gint *texture_height)
glBindTexture (GL_TEXTURE_2D, self->texture);
if (self->pixdata != NULL) {
*texture_width = retro_pixdata_get_width (self->pixdata);
*texture_height = retro_pixdata_get_height (self->pixdata);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment