Make UI block drawing closer to master
There is no need to break assumptions of what's being modified by this call and what's restored. The changes in this function simply spread crappyness outside of the UI block.
This commit is contained in:
parent
ba4d23fe37
commit
288892bf08
|
@ -1377,6 +1377,9 @@ 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();
|
||||
|
||||
|
@ -1402,7 +1405,10 @@ void UI_block_draw(const bContext *C, uiBlock *block)
|
|||
}
|
||||
}
|
||||
|
||||
/* restore model-view matrix */
|
||||
/* restore matrix */
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
gpuPopProjectionMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
gpuPopMatrix();
|
||||
|
||||
if (multisample_enabled)
|
||||
|
|
|
@ -1188,20 +1188,10 @@ void node_set_cursor(wmWindow *win, SpaceNode *snode, float cursor[2])
|
|||
|
||||
void node_draw_default(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node, bNodeInstanceKey key)
|
||||
{
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
gpuPushProjectionMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
gpuPushMatrix();
|
||||
|
||||
if (node->flag & NODE_HIDDEN)
|
||||
node_draw_hidden(C, ar, snode, ntree, node, key);
|
||||
else
|
||||
node_draw_basis(C, ar, snode, ntree, node, key);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
gpuPopProjectionMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
gpuPopMatrix();
|
||||
}
|
||||
|
||||
static void node_update(const bContext *C, bNodeTree *ntree, bNode *node)
|
||||
|
|
Loading…
Reference in New Issue