Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2016-08-07 00:32:19 +0300
committerMike Erwin <significant.bit@gmail.com>2016-08-07 08:05:49 +0300
commita55c5dbcc4b2ad7bd64386819681bcf1ac722a5b (patch)
tree5ae7ab0ea3ffda3214ecc7798462a1c7c26a3fdd /source/blender/gpu/GPU_immediate.h
parent3eae585791fb15db6cc0a081b30bb6a78b4f82bf (diff)
Gawain: flesh out immediate mode
More ways to send values via immAttrib: 2D float vectors 3 & 4 component ubytes (for colors mostly) New immVertex functions that act more like familiar glVertex. We’ll find a balance between making this API convenient and keeping it small. 2f and 3f are enough for now.
Diffstat (limited to 'source/blender/gpu/GPU_immediate.h')
-rw-r--r--source/blender/gpu/GPU_immediate.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_immediate.h b/source/blender/gpu/GPU_immediate.h
index aeed133645c..c48abbb6388 100644
--- a/source/blender/gpu/GPU_immediate.h
+++ b/source/blender/gpu/GPU_immediate.h
@@ -62,6 +62,14 @@ void immBegin(GLenum primitive, unsigned vertex_ct);
void immEnd(void);
void immAttrib1f(unsigned attrib_id, float x);
+void immAttrib2f(unsigned attrib_id, float x, float y);
void immAttrib3f(unsigned attrib_id, float x, float y, float z);
+void immAttrib3ub(unsigned attrib_id, unsigned char r, unsigned char g, unsigned char b);
+void immAttrib4ub(unsigned attrib_id, unsigned char r, unsigned char g, unsigned char b, unsigned char a);
+
void immEndVertex(void); // and move on to the next vertex
+
+// provide 2D or 3D attribute value and end the current vertex, similar to glVertex:
+void immVertex2f(unsigned attrib_id, float x, float y);
+void immVertex3f(unsigned attrib_id, float x, float y, float z);