[Bf-blender-cvs] [06f7fba6aa] blender2.8: add missing gpuRotate2D function

Mike Erwin noreply at git.blender.org
Tue Mar 21 06:42:47 CET 2017


Commit: 06f7fba6aaad19023f9430c311ab088a73a6d3e2
Author: Mike Erwin
Date:   Tue Mar 21 00:08:09 2017 -0400
Branches: blender2.8
https://developer.blender.org/rB06f7fba6aaad19023f9430c311ab088a73a6d3e2

add missing gpuRotate2D function

Prototype was there, we just weren't using this yet.

Part of T49450

===================================================================

M	source/blender/gpu/intern/gpu_matrix.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c
index de443dce56..f5b6238469 100644
--- a/source/blender/gpu/intern/gpu_matrix.c
+++ b/source/blender/gpu/intern/gpu_matrix.c
@@ -360,6 +360,18 @@ void gpuMultMatrix2D(const float m[3][3])
 	state.dirty = true;
 }
 
+void gpuRotate2D(float deg)
+{
+#if SUPPORT_LEGACY_MATRIX
+	if (state.mode == MATRIX_MODE_INACTIVE) {
+		glRotatef(deg, 0.0f, 0.0f, 1.0f);
+		return;
+	}
+#endif
+
+	BLI_assert(false); /* TODO: finish for MATRIX_MODE_2D */
+}
+
 void gpuRotate3f(float deg, float x, float y, float z)
 {
 	const float axis[3] = {x, y, z};




More information about the Bf-blender-cvs mailing list