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-17 04:45:17 +0300
committerMike Erwin <significant.bit@gmail.com>2016-08-17 04:45:17 +0300
commit6b34eed21735405099d5970ffae944bebb489a86 (patch)
tree4ea8ad5c63a986aadd3c9dc7ab74adde05634827 /source/blender/gpu/intern/gpu_immediate.c
parentb92d76000d93758309c35c09f3a06c6103cc8bd0 (diff)
Gawain: add v functions to immediate mode
Legacy OpenGL has a matching Vertex3fv for every Vertex3f, and so on. Add something similar to Gawain, just for a few common functions. Might add more as the need arises.
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate.c')
-rw-r--r--source/blender/gpu/intern/gpu_immediate.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate.c b/source/blender/gpu/intern/gpu_immediate.c
index e8a59c4854a..3065a3eb63f 100644
--- a/source/blender/gpu/intern/gpu_immediate.c
+++ b/source/blender/gpu/intern/gpu_immediate.c
@@ -616,6 +616,11 @@ void immAttrib4ub(unsigned attrib_id, unsigned char r, unsigned char g, unsigned
data[3] = a;
}
+void immAttrib4ubv(unsigned attrib_id, const unsigned char data[4])
+ {
+ immAttrib4ub(attrib_id, data[0], data[1], data[2], data[3]);
+ }
+
void immEndVertex()
{
#if TRUST_NO_ONE
@@ -664,6 +669,12 @@ void immVertex3f(unsigned attrib_id, float x, float y, float z)
immEndVertex();
}
+void immVertex3fv(unsigned attrib_id, const float data[3])
+ {
+ immAttrib3f(attrib_id, data[0], data[1], data[2]);
+ immEndVertex();
+ }
+
void immUniform4f(const char* name, float x, float y, float z, float w)
{
int loc = glGetUniformLocation(imm.bound_program, name);