diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-07-18 01:12:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-07-18 12:49:15 +0300 |
commit | 8cd7828792419fb4eac9a2a477968535b4c71535 (patch) | |
tree | 8fc733149fe07b7d9edd4b8b1e709519b4481887 /source/blender/windowmanager/intern/wm_gesture.c | |
parent | 247ad2034de2c33a6d9cb7d3b6f1ef7ffa5b859d (diff) |
GWN: Port to GPU module: Replace GWN prefix by GPU
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index 4366013084c..06a7f3528c5 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -166,7 +166,7 @@ static void wm_gesture_draw_line(wmGesture *gt) { rcti *rect = (rcti *)gt->customdata; - uint shdr_pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); + uint shdr_pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR); @@ -181,7 +181,7 @@ static void wm_gesture_draw_line(wmGesture *gt) float xmin = (float)rect->xmin; float ymin = (float)rect->ymin; - immBegin(GWN_PRIM_LINES, 2); + immBegin(GPU_PRIM_LINES, 2); immVertex2f(shdr_pos, xmin, ymin); immVertex2f(shdr_pos, (float)rect->xmax, (float)rect->ymax); immEnd(); @@ -193,7 +193,7 @@ static void wm_gesture_draw_rect(wmGesture *gt) { rcti *rect = (rcti *)gt->customdata; - uint shdr_pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_I32, 2, GWN_FETCH_INT_TO_FLOAT); + uint shdr_pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT); glEnable(GL_BLEND); @@ -206,7 +206,7 @@ static void wm_gesture_draw_rect(wmGesture *gt) glDisable(GL_BLEND); - shdr_pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); + shdr_pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR); @@ -231,7 +231,7 @@ static void wm_gesture_draw_circle(wmGesture *gt) glEnable(GL_BLEND); - const uint shdr_pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); + const uint shdr_pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); @@ -346,7 +346,7 @@ static void wm_gesture_draw_lasso(wmGesture *gt, bool filled) return; } - const uint shdr_pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); + const uint shdr_pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR); @@ -358,7 +358,7 @@ static void wm_gesture_draw_lasso(wmGesture *gt, bool filled) immUniformArray4fv("colors", (float *)(float[][4]){{0.4f, 0.4f, 0.4f, 1.0f}, {1.0f, 1.0f, 1.0f, 1.0f}}, 2); immUniform1f("dash_width", 2.0f); - immBegin((gt->type == WM_GESTURE_LASSO) ? GWN_PRIM_LINE_LOOP : GWN_PRIM_LINE_STRIP, numverts); + immBegin((gt->type == WM_GESTURE_LASSO) ? GPU_PRIM_LINE_LOOP : GPU_PRIM_LINE_STRIP, numverts); for (i = 0; i < gt->points; i++, lasso += 2) { immVertex2f(shdr_pos, (float)lasso[0], (float)lasso[1]); @@ -377,7 +377,7 @@ static void wm_gesture_draw_cross(wmWindow *win, wmGesture *gt) float x1, x2, y1, y2; - const uint shdr_pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); + const uint shdr_pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR); @@ -389,7 +389,7 @@ static void wm_gesture_draw_cross(wmWindow *win, wmGesture *gt) immUniformArray4fv("colors", (float *)(float[][4]){{0.4f, 0.4f, 0.4f, 1.0f}, {1.0f, 1.0f, 1.0f, 1.0f}}, 2); immUniform1f("dash_width", 8.0f); - immBegin(GWN_PRIM_LINES, 4); + immBegin(GPU_PRIM_LINES, 4); x1 = (float)(rect->xmin - winsize_x); y1 = (float)rect->ymin; |