diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpu/GPU_matrix.h | 3 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_matrix.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h index 4390b62379e..43a03f8e4b6 100644 --- a/source/blender/gpu/GPU_matrix.h +++ b/source/blender/gpu/GPU_matrix.h @@ -133,6 +133,9 @@ const float *gpuGetNormalMatrixInverse(float m[3][3]); #if SUPPORT_LEGACY_MATRIX /* copy top matrix from each legacy stack into new fresh stack */ void gpuMatrixBegin3D_legacy(void); + +/* call after using glScale, glTranslate, etc. between draw calls */ +void gpuMatrixUpdate_legacy(void); #endif diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c index b70aa4b7708..ba84d3d7e0b 100644 --- a/source/blender/gpu/intern/gpu_matrix.c +++ b/source/blender/gpu/intern/gpu_matrix.c @@ -699,3 +699,11 @@ bool gpuMatricesDirty() { return state.dirty; } + +#if SUPPORT_LEGACY_MATRIX +void gpuMatrixUpdate_legacy() +{ + BLI_assert(state.mode == MATRIX_MODE_INACTIVE); + state.dirty = true; +} +#endif |