Skip to content

Commit

Permalink
Add glColor4ub.
Browse files Browse the repository at this point in the history
  • Loading branch information
machinamentum committed Apr 15, 2016
1 parent 1393cbd commit 4ac1262
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libcaelina/source/glImpl_Vertex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ void glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ) {
g_state->currentTextureCoord = vec4(s, t, r, q);
}

void glColor4ub( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) {
GLfloat r = (GLfloat)red / 255.0f;
GLfloat g = (GLfloat)green / 255.0f;
GLfloat b = (GLfloat)blue / 255.0f;
GLfloat a = (GLfloat)alpha / 255.0f;
glColor4f(r, g, b, a);
}

void glColor3ub( GLubyte red, GLubyte green, GLubyte blue ) {
GLfloat r = (GLfloat)red / 255.0f;
GLfloat g = (GLfloat)green / 255.0f;
Expand Down

0 comments on commit 4ac1262

Please sign in to comment.