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:
authorMike Erwin <significant.bit@gmail.com>2017-03-21 23:08:14 +0300
committerMike Erwin <significant.bit@gmail.com>2017-03-21 23:11:55 +0300
commit3bd831d1d61634e533227bccc04a46574289b774 (patch)
treed13653a64c6a9e514653d08ada6b642b79281e6d /source/blender/editors/transform/transform_constraints.c
parent7870bde275a23b78198dc9d943e8dfe7a05a8b01 (diff)
OpenGL: convert to new matrix API (part 4)
Part of T49450, fixes a Push/Pop mismatch from part yesterday's 3.
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r--source/blender/editors/transform/transform_constraints.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 60689be5500..e934bacd0c7 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -43,6 +43,7 @@
#include "BIF_glutil.h"
#include "GPU_immediate.h"
+#include "GPU_matrix.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
@@ -778,13 +779,13 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
unit_m4(imat);
}
- glPushMatrix();
+ gpuPushMatrix();
if (t->spacetype == SPACE_VIEW3D) {
/* pass */
}
else if (t->spacetype == SPACE_IMAGE) {
- glScalef(1.0f / t->aspect[0], 1.0f / t->aspect[1], 1.0f);
+ gpuScale2f(1.0f / t->aspect[0], 1.0f / t->aspect[1]);
}
else if (ELEM(t->spacetype, SPACE_IPO, SPACE_ACTION)) {
/* only scale y */
@@ -794,7 +795,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
float ysize = BLI_rctf_size_y(datamask);
float xmask = BLI_rcti_size_x(mask);
float ymask = BLI_rcti_size_y(mask);
- glScalef(1.0f, (ysize / xsize) * (xmask / ymask), 1.0f);
+ gpuScale2f(1.0f, (ysize / xsize) * (xmask / ymask));
}
depth_test_enabled = glIsEnabled(GL_DEPTH_TEST);
@@ -815,7 +816,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
if (depth_test_enabled)
glEnable(GL_DEPTH_TEST);
- glPopMatrix();
+ gpuPopMatrix();
}
}