diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-15 16:06:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-15 16:16:54 +0300 |
commit | 7ba07b7e64c884bf69aa3c31d771e0275d39c1c3 (patch) | |
tree | e2da831e166f213ebb381f3d196da7370726f912 /source/blender/gpu/GPU_batch.h | |
parent | 5cb43b0f2037c903c635609c75ebf0c3a23ad146 (diff) |
GPU_batch_from_poly_2d_encoded: optional rctf arg
Also use compiler attributes
Diffstat (limited to 'source/blender/gpu/GPU_batch.h')
-rw-r--r-- | source/blender/gpu/GPU_batch.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index 8b2dc2af355..4eaf90b486e 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -33,26 +33,31 @@ #include "../../../intern/gawain/gawain/gwn_batch.h" +struct rctf; + // TODO: CMake magic to do this: // #include "gawain/batch.h" +#include "BLI_compiler_attrs.h" + #include "GPU_shader.h" /* Extend GWN_batch_program_set to use Blender’s library of built-in shader programs. */ /* gpu_batch.c */ -void GWN_batch_program_set_builtin(Gwn_Batch *, GPUBuiltinShader); +void GWN_batch_program_set_builtin(Gwn_Batch *batch, GPUBuiltinShader shader_id) ATTR_NONNULL(1); Gwn_Batch *GPU_batch_from_poly_2d_encoded( - const uchar *polys_flat, uint polys_flat_len, float min, float max); + const uchar *polys_flat, uint polys_flat_len, const struct rctf *rect + ) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); void gpu_batch_init(void); void gpu_batch_exit(void); /* gpu_batch_presets.c */ /* Replacement for gluSphere */ -Gwn_Batch *GPU_batch_preset_sphere(int lod); -Gwn_Batch *GPU_batch_preset_sphere_wire(int lod); +Gwn_Batch *GPU_batch_preset_sphere(int lod) ATTR_WARN_UNUSED_RESULT; +Gwn_Batch *GPU_batch_preset_sphere_wire(int lod) ATTR_WARN_UNUSED_RESULT; void gpu_batch_presets_init(void); void gpu_batch_presets_exit(void); |