Adds protection of the texture matrix stack which allows the user to use sf::Sprites with this code unmodified otherwise
This commit is contained in:
parent
9e0ed888fb
commit
0fca7e2045
@ -81,6 +81,9 @@ nk_sfml_render(enum nk_anti_aliasing AA)
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
glViewport(0, 0, (GLsizei)window_width, (GLsizei)window_height);
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
@ -165,6 +168,8 @@ nk_sfml_render(enum nk_anti_aliasing AA)
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
glPopMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPopMatrix();
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
|
Loading…
Reference in New Issue
Block a user