mirror of https://github.com/snes9xgit/snes9x.git
GTK+: Fix OpenGL without NPOT.
This commit is contained in:
parent
43c61d1c77
commit
7700efe1fc
|
@ -328,9 +328,25 @@ void S9xOpenGLDisplayDriver::update_texture_size (int width, int height)
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
texture_width = width;
|
coords[9] = 1.0f;
|
||||||
texture_height = height;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue