diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-07-17 22:11:23 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-07-18 01:17:57 +0300 |
commit | 247ad2034de2c33a6d9cb7d3b6f1ef7ffa5b859d (patch) | |
tree | 153014a1b6f2fc8c09dddb11ef752eae047b3509 /source/blender/gpu/GPU_immediate_util.h | |
parent | 6329629bb9eab86a989367a148154a7ebfa074df (diff) |
GWN: Port to GPU module: Move files to GPU
This does not include all the struct and type renaming. Only files were
renamed.
gwn_batch.c/h was fusioned with GPU_batch.c/h
gwn_immediate.c/h was fusioned with GPU_immediate.c/h
gwn_imm_util.c/h was fusioned with GPU_immediate_util.c/h
Diffstat (limited to 'source/blender/gpu/GPU_immediate_util.h')
-rw-r--r-- | source/blender/gpu/GPU_immediate_util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_immediate_util.h b/source/blender/gpu/GPU_immediate_util.h index c31d477ff5b..0a5c9805509 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 GWN_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); |