diff options
Diffstat (limited to 'source/blender/gpu/GPU_immediate_util.h')
-rw-r--r-- | source/blender/gpu/GPU_immediate_util.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_immediate_util.h b/source/blender/gpu/GPU_immediate_util.h index c31d477ff5b..58555e287b0 100644 --- a/source/blender/gpu/GPU_immediate_util.h +++ b/source/blender/gpu/GPU_immediate_util.h @@ -27,6 +27,15 @@ #ifndef __GPU_IMMEDIATE_UTIL_H__ #define __GPU_IMMEDIATE_UTIL_H__ +/* Draw 2D rectangles (replaces glRect functions) */ +/* caller is reponsible for vertex format & shader */ +void immRectf(uint pos, float x1, float y1, float x2, float y2); +void immRecti(uint pos, int x1, int y1, int x2, int y2); + +/* Same as immRectf/immRecti but does not call immBegin/immEnd. To use with GPU_PRIM_TRIS. */ +void immRectf_fast_with_color(uint pos, uint col, float x1, float y1, float x2, float y2, const float color[4]); +void immRecti_fast_with_color(uint pos, uint col, int x1, int y1, int x2, int y2, const float color[4]); + void imm_cpack(uint x); void imm_draw_circle_wire_2d(uint shdr_pos, float x, float y, float radius, int nsegments); @@ -35,7 +44,7 @@ void imm_draw_circle_fill_2d(uint shdr_pos, float x, float y, float radius, int void imm_draw_circle_wire_aspect_2d(uint shdr_pos, float x, float y, float radius_x, float radius_y, int nsegments); void imm_draw_circle_fill_aspect_2d(uint shdr_pos, float x, float y, float radius_x, float radius_y, int nsegments); -/* use this version when Gwn_VertFormat has a vec3 position */ +/* use this version when GPUVertFormat has a vec3 position */ 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); |