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:
authorCampbell Barton <ideasman42@gmail.com>2018-07-15 16:27:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-15 16:34:13 +0300
commit57ab7daa2aee436b0b0acfa00b2e2b1d28b55b2c (patch)
tree377218e81452e4e0d3f8ca3cf3c3ac5148f237b8 /source/blender/editors/screen
parentb457cae397054a1be4e60f3007995f97c198b2b6 (diff)
GPU_matrix: use Blender's naming conventions
Thanks to @sergey for review
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/area.c16
-rw-r--r--source/blender/editors/screen/glutil.c4
-rw-r--r--source/blender/editors/screen/screen_draw.c8
3 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 41c3209dbb1..cb8fdba0ae1 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -146,7 +146,7 @@ static void region_draw_emboss(const ARegion *ar, const rcti *scirct, int sides)
void ED_region_pixelspace(ARegion *ar)
{
wmOrtho2_region_pixelspace(ar);
- gpuLoadIdentity();
+ GPU_matrix_identity_set();
}
/* only exported for WM */
@@ -352,8 +352,8 @@ static void region_draw_azones(ScrArea *sa, ARegion *ar)
GPU_blend(true);
GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
- gpuPushMatrix();
- gpuTranslate2f(-ar->winrct.xmin, -ar->winrct.ymin);
+ GPU_matrix_push();
+ GPU_matrix_translate_2f(-ar->winrct.xmin, -ar->winrct.ymin);
for (az = sa->actionzones.first; az; az = az->next) {
/* test if action zone is over this region */
@@ -388,7 +388,7 @@ static void region_draw_azones(ScrArea *sa, ARegion *ar)
}
}
- gpuPopMatrix();
+ GPU_matrix_pop();
GPU_blend(false);
}
@@ -2674,11 +2674,11 @@ void ED_region_image_metadata_draw(int x, int y, ImBuf *ibuf, const rctf *frame,
return;
/* find window pixel coordinates of origin */
- gpuPushMatrix();
+ GPU_matrix_push();
/* offset and zoom using ogl */
- gpuTranslate2f(x, y);
- gpuScale2f(zoomx, zoomy);
+ GPU_matrix_translate_2f(x, y);
+ GPU_matrix_scale_2f(zoomx, zoomy);
BLF_size(blf_mono_font, style->widgetlabel.points * 1.5f * U.pixelsize, U.dpi);
@@ -2732,7 +2732,7 @@ void ED_region_image_metadata_draw(int x, int y, ImBuf *ibuf, const rctf *frame,
BLF_disable(blf_mono_font, BLF_CLIPPING);
}
- gpuPopMatrix();
+ GPU_matrix_pop();
}
void ED_region_grid_draw(ARegion *ar, float zoomx, float zoomy)
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 6cff82295f0..41404aee9c9 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -364,7 +364,7 @@ void bglPolygonOffset(float viewdist, float dist)
// glPolygonOffset(-1.0, -1.0);
/* hack below is to mimic polygon offset */
- gpuGetProjectionMatrix(winmat);
+ GPU_matrix_projection_get(winmat);
/* dist is from camera to center point */
@@ -401,7 +401,7 @@ void bglPolygonOffset(float viewdist, float dist)
offset = 0.0;
}
- gpuLoadProjectionMatrix(winmat);
+ GPU_matrix_projection_set(winmat);
}
/* **** Color management helper functions for GLSL display/transform ***** */
diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c
index 9c46938a90f..6e512d6d4df 100644
--- a/source/blender/editors/screen/screen_draw.c
+++ b/source/blender/editors/screen/screen_draw.c
@@ -627,14 +627,14 @@ static void screen_preview_draw(const bScreen *screen, int size_x, int size_y)
wmOrtho2(0.0f, size_x, 0.0f, size_y);
/* center */
- gpuPushMatrix();
- gpuLoadIdentity();
- gpuTranslate2f(size_x * (1.0f - asp[0]) * 0.5f, size_y * (1.0f - asp[1]) * 0.5f);
+ GPU_matrix_push();
+ GPU_matrix_identity_set();
+ GPU_matrix_translate_2f(size_x * (1.0f - asp[0]) * 0.5f, size_y * (1.0f - asp[1]) * 0.5f);
screen_preview_scale_get(screen, size_x, size_y, asp, scale);
screen_preview_draw_areas(screen, scale, col, 1.5f);
- gpuPopMatrix();
+ GPU_matrix_pop();
}
/**