diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-08-27 21:10:37 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-08-27 21:10:37 +0300 |
commit | 9d3813e602b83c3aa61068e9c592eee4786636af (patch) | |
tree | 5c7194037dfc23354cd69c734bfdd00c8bf9ab82 /source/blender/gpu/GPU_immediate.h | |
parent | 42bbfe7f0a1f357781859ee3a2819f00e2c54f4c (diff) |
Gawain: convenience functions for uniform color
Application code can pass ubytes, Gawain converts to float vec4 expected by shader.
For now the conversion is simple linear. We can add sRGB support later if needed.
Diffstat (limited to 'source/blender/gpu/GPU_immediate.h')
-rw-r--r-- | source/blender/gpu/GPU_immediate.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_immediate.h b/source/blender/gpu/GPU_immediate.h index 08362c35845..6bcfdc74ef6 100644 --- a/source/blender/gpu/GPU_immediate.h +++ b/source/blender/gpu/GPU_immediate.h @@ -91,3 +91,8 @@ void immVertex3fv(unsigned attrib_id, const float data[3]); // provide values that don't change for the entire draw call void immUniform4f(const char* name, float x, float y, float z, float w); + +// these set "uniform vec4 color" +// TODO: treat as sRGB? +void immUniformColor3ubv(const unsigned char data[3]); +void immUniformColor4ubv(const unsigned char data[4]); |