diff --git a/GL/immediate.c b/GL/immediate.c index f4f1ba7..cfbf0b1 100644 --- a/GL/immediate.c +++ b/GL/immediate.c @@ -104,6 +104,15 @@ void APIENTRY glColor4ub(GLubyte r, GLubyte g, GLubyte b, GLubyte a) { COLOR[B8IDX] = b; } +void APIENTRY glColor4ubv(const GLubyte *v) { + IM_ENABLED_VERTEX_ATTRIBUTES |= DIFFUSE_ENABLED_FLAG; + + COLOR[A8IDX] = v[3]; + COLOR[R8IDX] = v[0]; + COLOR[G8IDX] = v[1]; + COLOR[B8IDX] = v[2]; +} + void APIENTRY glColor4fv(const GLfloat* v) { IM_ENABLED_VERTEX_ATTRIBUTES |= DIFFUSE_ENABLED_FLAG; diff --git a/include/GL/gl.h b/include/GL/gl.h index c456c86..74bc32b 100644 --- a/include/GL/gl.h +++ b/include/GL/gl.h @@ -431,6 +431,7 @@ GLAPI void APIENTRY glTexCoord2fv(const GLfloat *uv); /* Primitive Color Submission */ GLAPI void APIENTRY glColor1ui(GLuint argb); GLAPI void APIENTRY glColor4ub(GLubyte r, GLubyte g, GLubyte b, GLubyte a); +GLAPI void APIENTRY glColor4ubv(const GLubyte *v); GLAPI void APIENTRY glColor3f(GLfloat r, GLfloat g, GLfloat b); GLAPI void APIENTRY glColor3ub(GLubyte r, GLubyte g, GLubyte b); GLAPI void APIENTRY glColor3ubv(const GLubyte *v);