void buildGLColorArray(GLubyte* ptr, unsigned int color, unsigned int vertCount) { for(unsigned int i = 0; i < vertCount; i++) { setColor4bArray(ptr, color); ptr += 4; } }
void buildGLColorArray(GLubyte* ptr, unsigned int color, unsigned int vertCount) { unsigned int colorGl; setColor4bArray((GLubyte*)&colorGl, color); for(unsigned int i = 0; i < vertCount; i++) { ((GLuint*)ptr)[i] = colorGl; } }
void buildGLColorArray(GLubyte* ptr, unsigned int color, unsigned int vertCount) { //convert color from ???? to RGBA? unsigned int colorRGBA; setColor4bArray((GLubyte *)&colorRGBA, color); //write color to unsigned int array GLuint * uiPtr = (GLuint *)ptr; for(unsigned int i = 0; i < vertCount; i++) { uiPtr[i] = colorRGBA; } }