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:
authorMike Erwin <significant.bit@gmail.com>2017-03-22 01:10:20 +0300
committerMike Erwin <significant.bit@gmail.com>2017-03-22 01:10:20 +0300
commit0a274df536251adbb7141f6baf8a95af89e50710 (patch)
tree6605097f2b57347dbdff1d28d3a0c35b4edb0a59 /source/blender/gpu/GPU_matrix.h
parent6d2aca5a96efd8ac61eec633c43a41e641379a68 (diff)
OpenGL: add gpuLoadProjectionMatrix3D function
Make an existing 4x4 matrix the current projection. Found a need for this while converting code to new API. Part of T49450
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 dd65d39822c..d0194659db5 100644
--- a/source/blender/gpu/GPU_matrix.h
+++ b/source/blender/gpu/GPU_matrix.h
@@ -106,6 +106,8 @@ void gpuRotate2D(float deg);
/* 3D Projection Matrix */
+void gpuLoadProjectionMatrix3D(const float m[4][4]);
+
void gpuOrtho(float left, float right, float bottom, float top, float near, float far);
void gpuFrustum(float left, float right, float bottom, float top, float near, float far);
void gpuPerspective(float fovy, float aspect, float near, float far);
@@ -174,6 +176,8 @@ bool gpuMatricesDirty(void); /* since last bind */
# define gpuMultMatrix3D(x) gpuMultMatrix3D((const float (*)[4])(x))
# define gpuLoadMatrix3D(x) gpuLoadMatrix3D((const float (*)[4])(x))
+# define gpuLoadProjectionMatrix3D(x) gpuLoadProjectionMatrix3D((const float (*)[4])(x))
+
# define gpuMultMatrix2D(x) gpuMultMatrix2D((const float (*)[3])(x))
# define gpuLoadMatrix2D(x) gpuLoadMatrix2D((const float (*)[3])(x))