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:
authorCampbell Barton <ideasman42@gmail.com>2020-02-04 14:20:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-02-04 14:20:58 +0300
commit5c8f8a74030c96e07a0ce719f37ed7958b6c3fb8 (patch)
tree6ef48627addb8acf00f2cff7cde50592dd730d98 /source/blender/gpu/intern
parent04ec64b251f155581b6bd2a6bc0d55c4381ba12d (diff)
parent3dde6360ff6ae002002472f7b5a155e3d119230f (diff)
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_matrix.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c
index 5e44a950ba7..8260e1496ff 100644
--- a/source/blender/gpu/intern/gpu_matrix.c
+++ b/source/blender/gpu/intern/gpu_matrix.c
@@ -421,6 +421,14 @@ void GPU_matrix_ortho_set(float left, float right, float bottom, float top, floa
gpu_matrix_state_active_set_dirty(true);
}
+void GPU_matrix_ortho_set_z(float near, float far)
+{
+ CHECKMAT(Projection);
+ Projection[2][2] = -2.0f / (far - near);
+ Projection[3][2] = -(far + near) / (far - near);
+ gpu_matrix_state_active_set_dirty(true);
+}
+
void GPU_matrix_ortho_2d_set(float left, float right, float bottom, float top)
{
Mat4 m;