diff options
Diffstat (limited to 'source/blender/gpu/GPU_matrix.h')
-rw-r--r-- | source/blender/gpu/GPU_matrix.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h index 73566292799..3c3acc08f58 100644 --- a/source/blender/gpu/GPU_matrix.h +++ b/source/blender/gpu/GPU_matrix.h @@ -39,6 +39,12 @@ extern "C" { #endif +/* For now we support the legacy matrix stack in gpuGetMatrix functions. + * Will remove this after switching to core profile, which can happen after + * we convert all code to use the API in this file. */ +#define SUPPORT_LEGACY_MATRIX 1 + + void gpuMatrixInit(void); /* called by system -- make private? */ @@ -120,6 +126,13 @@ const float *gpuGetModelViewMatrix3D(float m[4][4]); const float *gpuGetProjectionMatrix3D(float m[4][4]); const float *gpuGetModelViewProjectionMatrix3D(float m[4][4]); + +#if SUPPORT_LEGACY_MATRIX +/* copy top matrix from each legacy stack into new fresh stack */ +void gpuMatrixBegin3D_legacy(void); +#endif + + /* set uniform values for currently bound shader */ void gpuBindMatrices(GLuint program); |