GTK+: Fix OpenGL without NPOT.

This commit is contained in:
Brandon Wright 2018-11-02 15:25:32 -05:00
parent 43c61d1c77
commit 7700efe1fc
1 changed files with 18 additions and 2 deletions

View File

@ -328,9 +328,25 @@ void S9xOpenGLDisplayDriver::update_texture_size (int width, int height)
NULL);
}
texture_width = width;
texture_height = height;
coords[9] = 1.0f;
coords[10] = 1.0f;
coords[11] = 1.0f;
coords[14] = 1.0f;
}
else
{
coords[9] = height / 1024.0f;
coords[10] = width / 1024.0f;
coords[11] = height / 1024.0f;
coords[14] = width / 1024.0f;
}
texture_width = width;
texture_height = height;
glBindBuffer (GL_ARRAY_BUFFER, coord_buffer);
glBufferData (GL_ARRAY_BUFFER, sizeof (GLfloat) * 16, coords, GL_STATIC_DRAW);
glBindBuffer (GL_ARRAY_BUFFER, 0);
}
}