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-27 04:05:02 +0300
committerMike Erwin <significant.bit@gmail.com>2017-03-27 04:23:54 +0300
commita68cc0dc26bf55a9087375f8d104fcccd8571844 (patch)
tree3e01e14e4efb48981b81328456d5a0c332830650 /source/blender/editors/sculpt_paint
parent67ffad8cd2b44d7685ec5aec2a76e1cb13d9f7a1 (diff)
OpenGL: use old API for texture matrix
New matrix API does not support texture matrices. Not sure what the final code will look like, but this at least avoids interference with new ModelView matrix. Marked each line with TEXTURE so they can be disregarded during searches. Related to T49450
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index e90baf083d5..0e18bddc45f 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -606,20 +606,20 @@ static void paint_draw_tex_overlay(UnifiedPaintSettings *ups, Brush *brush,
glDepthFunc(GL_ALWAYS);
glMatrixMode(GL_TEXTURE);
- gpuPushMatrix();
- gpuLoadIdentity();
+ glPushMatrix(); /* TEXTURE */
+ glLoadIdentity(); /* TEXTURE */
if (mtex->brush_map_mode == MTEX_MAP_MODE_VIEW) {
/* brush rotation */
- gpuTranslate2f(0.5, 0.5);
- gpuRotate2D(RAD2DEGF(primary ? ups->brush_rotation : ups->brush_rotation_sec));
- gpuTranslate2f(-0.5f, -0.5f);
+ glTranslatef(0.5, 0.5, 0); /* TEXTURE */
+ glRotatef(RAD2DEGF(primary ? ups->brush_rotation : ups->brush_rotation_sec), 0, 0, 1); /* TEXTURE */
+ glTranslatef(-0.5f, -0.5f, 0); /* TEXTURE */
/* scale based on tablet pressure */
if (primary && ups->stroke_active && BKE_brush_use_size_pressure(vc->scene, brush)) {
- gpuTranslate2f(0.5f, 0.5f);
- gpuScaleUniform(1.0f / ups->size_pressure_value);
- gpuTranslate2f(-0.5f, -0.5f);
+ glTranslatef(0.5f, 0.5f, 0); /* TEXTURE */
+ glScalef(1.0f / ups->size_pressure_value, 1.0f / ups->size_pressure_value, 1.0f / ups->size_pressure_value); /* TEXTURE */
+ glTranslatef(-0.5f, -0.5f, 0); /* TEXTURE */
}
if (ups->draw_anchored) {
@@ -697,7 +697,7 @@ static void paint_draw_tex_overlay(UnifiedPaintSettings *ups, Brush *brush,
immUnbindProgram();
- gpuPopMatrix();
+ glPopMatrix(); /* TEXTURE */
if (mtex->brush_map_mode == MTEX_MAP_MODE_STENCIL) {
glMatrixMode(GL_MODELVIEW);