diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-04 14:20:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-04 14:20:58 +0300 |
commit | 5c8f8a74030c96e07a0ce719f37ed7958b6c3fb8 (patch) | |
tree | 6ef48627addb8acf00f2cff7cde50592dd730d98 /source/blender/gpu/intern | |
parent | 04ec64b251f155581b6bd2a6bc0d55c4381ba12d (diff) | |
parent | 3dde6360ff6ae002002472f7b5a155e3d119230f (diff) |
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_matrix.c | 8 |
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; |