diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-13 17:39:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-13 18:24:50 +0300 |
commit | 6d359e4498848d795b8043e923850d0a0da7f4ed (patch) | |
tree | d46262708081379039f41d7c33f14028d4ef84de /source/blender/gpu | |
parent | 2a01fb61f8402b31b9f85039e28acf310b1da332 (diff) |
Cleanup: use explicit 2d suffix for imm utils
Avoid ambiguity between 2d/3d (which were already named).
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_immediate_util.h | 26 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_immediate_util.c | 10 |
2 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/gpu/GPU_immediate_util.h b/source/blender/gpu/GPU_immediate_util.h index f91dd6147a0..e3a697fd229 100644 --- a/source/blender/gpu/GPU_immediate_util.h +++ b/source/blender/gpu/GPU_immediate_util.h @@ -27,33 +27,33 @@ #ifndef __GPU_IMMEDIATE_UTIL_H__ #define __GPU_IMMEDIATE_UTIL_H__ -void imm_cpack(unsigned int x); +void imm_cpack(uint x); -void imm_draw_circle_wire(uint shdr_pos, float x, float y, float radius, int nsegments); -void imm_draw_circle_fill(uint shdr_pos, float x, float y, float radius, int nsegments); +void imm_draw_circle_wire_2d(uint shdr_pos, float x, float y, float radius, int nsegments); +void imm_draw_circle_fill_2d(uint shdr_pos, float x, float y, float radius, int nsegments); /* use this version when Gwn_VertFormat has a vec3 position */ -void imm_draw_circle_wire_3d(unsigned pos, float x, float y, float radius, int nsegments); -void imm_draw_circle_fill_3d(unsigned pos, float x, float y, float radius, int nsegments); +void imm_draw_circle_wire_3d(uint pos, float x, float y, float radius, int nsegments); +void imm_draw_circle_fill_3d(uint pos, float x, float y, float radius, int nsegments); -void imm_draw_disk_partial_fill( - unsigned pos, float x, float y, +void imm_draw_disk_partial_fill_2d( + uint pos, float x, float y, float radius_inner, float radius_outer, int nsegments, float start, float sweep); -void imm_draw_line_box(unsigned pos, float x1, float y1, float x2, float y2); +void imm_draw_line_box_2d(uint pos, float x1, float y1, float x2, float y2); -void imm_draw_line_box_3d(unsigned pos, float x1, float y1, float x2, float y2); +void imm_draw_line_box_3d(uint pos, float x1, float y1, float x2, float y2); -void imm_draw_checker_box(float x1, float y1, float x2, float y2); +void imm_draw_checker_box_2d(float x1, float y1, float x2, float y2); void imm_draw_cylinder_fill_normal_3d( - unsigned int pos, unsigned int nor, float base, float top, float height, + uint pos, uint nor, float base, float top, float height, int slices, int stacks); void imm_draw_cylinder_wire_3d( - unsigned int pos, float base, float top, float height, + uint pos, float base, float top, float height, int slices, int stacks); void imm_draw_cylinder_fill_3d( - unsigned int pos, float base, float top, float height, + uint pos, float base, float top, float height, int slices, int stacks); #endif /* __GPU_IMMEDIATE_UTIL_H__ */ diff --git a/source/blender/gpu/intern/gpu_immediate_util.c b/source/blender/gpu/intern/gpu_immediate_util.c index e6923d38110..4f68bbef4d7 100644 --- a/source/blender/gpu/intern/gpu_immediate_util.c +++ b/source/blender/gpu/intern/gpu_immediate_util.c @@ -71,7 +71,7 @@ static void imm_draw_circle(Gwn_PrimType prim_type, const uint shdr_pos, float x * \param radius The circle's radius. * \param nsegments The number of segments to use in drawing (more = smoother). */ -void imm_draw_circle_wire(uint shdr_pos, float x, float y, float rad, int nsegments) +void imm_draw_circle_wire_2d(uint shdr_pos, float x, float y, float rad, int nsegments) { imm_draw_circle(GWN_PRIM_LINE_LOOP, shdr_pos, x, y, rad, nsegments); } @@ -86,7 +86,7 @@ void imm_draw_circle_wire(uint shdr_pos, float x, float y, float rad, int nsegme * \param radius The circle's radius. * \param nsegments The number of segments to use in drawing (more = smoother). */ -void imm_draw_circle_fill(uint shdr_pos, float x, float y, float rad, int nsegments) +void imm_draw_circle_fill_2d(uint shdr_pos, float x, float y, float rad, int nsegments) { imm_draw_circle(GWN_PRIM_TRI_FAN, shdr_pos, x, y, rad, nsegments); } @@ -128,7 +128,7 @@ static void imm_draw_disk_partial( * \param start: Specifies the starting angle, in degrees, of the disk portion. * \param sweep: Specifies the sweep angle, in degrees, of the disk portion. */ -void imm_draw_disk_partial_fill( +void imm_draw_disk_partial_fill_2d( unsigned pos, float x, float y, float rad_inner, float rad_outer, int nsegments, float start, float sweep) { @@ -166,7 +166,7 @@ void imm_draw_circle_fill_3d(unsigned pos, float x, float y, float rad, int nseg * \param x2 right. * \param y2 top. */ -void imm_draw_line_box(unsigned pos, float x1, float y1, float x2, float y2) +void imm_draw_line_box_2d(unsigned pos, float x1, float y1, float x2, float y2) { immBegin(GWN_PRIM_LINE_LOOP, 4); immVertex2f(pos, x1, y1); @@ -190,7 +190,7 @@ void imm_draw_line_box_3d(unsigned pos, float x1, float y1, float x2, float y2) /** * Draw a standard checkerboard to indicate transparent backgrounds. */ -void imm_draw_checker_box(float x1, float y1, float x2, float y2) +void imm_draw_checker_box_2d(float x1, float y1, float x2, float y2) { unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_CHECKER); |