diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-04-19 11:26:40 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-04-19 16:22:58 +0300 |
commit | 288892bf08f380afdfe7f2f8f5b1ca2d2e037fe3 (patch) | |
tree | e0cf69efaad904000ee93541b67d94d94d4c0ff3 /source/blender/editors/interface | |
parent | ba4d23fe37ee626c92c61bf0f78f64dcc2d95114 (diff) |
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.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index bc7f835390c..365ebfc17c4 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -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) |