Get rid of glMatrixMode calls
With the explicit calls we don't need to worry about current state outside of the GPU module now. In fact. we don't need to worry about current matrix mode in core profile at all. Legacy OpenGL now has some code which ensures current matrix mode when using explicit calls to push/pop matrix.
This commit is contained in:
@@ -1377,9 +1377,7 @@ void UI_block_draw(const bContext *C, uiBlock *block)
|
||||
ui_but_to_pixelrect(&rect, ar, block, NULL);
|
||||
|
||||
/* pixel space for AA widgets */
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
gpuPushProjectionMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
gpuPushMatrix();
|
||||
gpuLoadIdentity();
|
||||
|
||||
@@ -1406,9 +1404,7 @@ void UI_block_draw(const bContext *C, uiBlock *block)
|
||||
}
|
||||
|
||||
/* restore matrix */
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
gpuPopProjectionMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
gpuPopMatrix();
|
||||
|
||||
if (multisample_enabled)
|
||||
|
||||
Reference in New Issue
Block a user