Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-04-19 11:13:10 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-04-19 16:22:58 +0300
commitba4d23fe37ee626c92c61bf0f78f64dcc2d95114 (patch)
tree68e34d845b87dbaa19b24dd04952aa71068ca16c /source/blender/gpu/GPU_matrix.h
parent781108cdc6095f126ad0c77411d39acb52f11aa0 (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/gpu/GPU_matrix.h')
-rw-r--r--source/blender/gpu/GPU_matrix.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h
index 93bb1dd4051..749784c9a2c 100644
--- a/source/blender/gpu/GPU_matrix.h
+++ b/source/blender/gpu/GPU_matrix.h
@@ -87,6 +87,10 @@ void gpuScale2f(float x, float y);
void gpuScale2fv(const float vec[2]);
void gpuRotate2D(float deg);
+/* Projection Matrix (2D or 3D) */
+
+void gpuPushProjectionMatrix(void);
+void gpuPopProjectionMatrix(void);
/* 3D Projection Matrix */