diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-04-19 11:13:10 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-04-19 16:22:58 +0300 |
commit | ba4d23fe37ee626c92c61bf0f78f64dcc2d95114 (patch) | |
tree | 68e34d845b87dbaa19b24dd04952aa71068ca16c /source/blender/windowmanager/intern/wm_playanim.c | |
parent | 781108cdc6095f126ad0c77411d39acb52f11aa0 (diff) |
Fix node editor drawing when built with core profile
There are two major things in this commit.
First one is to have proper stack for projection matrices. This is
something what OpenGL specification grants to have at least 2 elements
for and what is required to have for proper editor drawing without
refactoring the way how we restore projection matrix.
Supporting this stack have following advantages:
- Our GPU stack is closer to OpenGL specs, making it easier to follow
by other developers who are always familiar with OpenGL.
- Makes it easier to port all editors to a new API.
- Should help us getting rid of extra matrix push/pop added in
various commits to 2.8 branch.
The new API follows the following convention:
- gpuPushMatrix/gpuPopMatrix ALWAYS deals with model view matrix
and nothing more.
While this name does not fully indicate that it's only model view
matrix operator, it matches behavior of other matrix operations
such as transform which also doesn't indicate what matrix type
they are operating on.
- Projection matrix has dedicated calls for push/pop which are
gpuPushProjectionMatrix/gpuPopProjectionMatrix.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_playanim.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_playanim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index c9ce5d140a5..ebc79986198 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -361,7 +361,7 @@ static void playanim_toscreen(PlayState *ps, PlayAnimPict *picture, struct ImBuf fac = 2.0f * fac - 1.0f; glMatrixMode(GL_PROJECTION); /* TODO: convert this nasty code */ - gpuPushMatrix(); + gpuPushProjectionMatrix(); gpuLoadIdentity(); glMatrixMode(GL_MODELVIEW); gpuPushMatrix(); @@ -381,7 +381,7 @@ static void playanim_toscreen(PlayState *ps, PlayAnimPict *picture, struct ImBuf gpuPopMatrix(); glMatrixMode(GL_PROJECTION); - gpuPopMatrix(); + gpuPopProjectionMatrix(); glMatrixMode(GL_MODELVIEW); } |