diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-15 16:27:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-15 16:34:13 +0300 |
commit | 57ab7daa2aee436b0b0acfa00b2e2b1d28b55b2c (patch) | |
tree | 377218e81452e4e0d3f8ca3cf3c3ac5148f237b8 /source/blender/windowmanager/intern/wm_operators.c | |
parent | b457cae397054a1be4e60f3007995f97c198b2b6 (diff) |
GPU_matrix: use Blender's naming conventions
Thanks to @sergey for review
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 5cf9ac625c3..64aa64e1478 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2118,8 +2118,8 @@ static void radial_control_paint_tex(RadialControl *rc, float radius, float alph /* set up rotation if available */ if (rc->rot_prop) { rot = RNA_property_float_get(&rc->rot_ptr, rc->rot_prop); - gpuPushMatrix(); - gpuRotate2D(RAD2DEGF(rot)); + GPU_matrix_push(); + GPU_matrix_rotate_2d(RAD2DEGF(rot)); } /* draw textured quad */ @@ -2141,7 +2141,7 @@ static void radial_control_paint_tex(RadialControl *rc, float radius, float alph /* undo rotation */ if (rc->rot_prop) - gpuPopMatrix(); + GPU_matrix_pop(); } else { /* flat color if no texture available */ @@ -2208,7 +2208,7 @@ static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void /* Keep cursor in the original place */ x = rc->initial_mouse[0]; y = rc->initial_mouse[1]; - gpuTranslate2f((float)x, (float)y); + GPU_matrix_translate_2f((float)x, (float)y); glEnable(GL_BLEND); glEnable(GL_LINE_SMOOTH); @@ -2216,7 +2216,7 @@ static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void /* apply zoom if available */ if (rc->zoom_prop) { RNA_property_float_get_array(&rc->zoom_ptr, rc->zoom_prop, zoom); - gpuScale2fv(zoom); + GPU_matrix_scale_2fv(zoom); } /* draw rotated texture */ @@ -2233,23 +2233,23 @@ static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void immUniformColor3fvAlpha(col, 0.5f); if (rc->subtype == PROP_ANGLE) { - gpuPushMatrix(); + GPU_matrix_push(); /* draw original angle line */ - gpuRotate2D(RAD2DEGF(rc->initial_value)); + GPU_matrix_rotate_2d(RAD2DEGF(rc->initial_value)); immBegin(GWN_PRIM_LINES, 2); immVertex2f(pos, (float)WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE, 0.0f); immVertex2f(pos, (float)WM_RADIAL_CONTROL_DISPLAY_SIZE, 0.0f); immEnd(); /* draw new angle line */ - gpuRotate2D(RAD2DEGF(rc->current_value - rc->initial_value)); + GPU_matrix_rotate_2d(RAD2DEGF(rc->current_value - rc->initial_value)); immBegin(GWN_PRIM_LINES, 2); immVertex2f(pos, (float)WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE, 0.0f); immVertex2f(pos, (float)WM_RADIAL_CONTROL_DISPLAY_SIZE, 0.0f); immEnd(); - gpuPopMatrix(); + GPU_matrix_pop(); } /* draw circles on top */ |