use of glColorPointer
i successfully setup a vertex array consisting of a 100x100 textured triangle strip. I''d like to alter the grid area trasparencet, so i modified my glColorPointer function like this:
g_colorArray[currentVertex][0]=g_colorArray[currentVertex][1]=g_colorArray[currentVertex][2]=1;
g_colorArray[currentVertex][3]=0.1f; // this is the alpha channel ?
glColorPointer(4,GL_FLOAT,0,g_colorArray);
It doesnt work. I usually see on tutorials that they use glColorPointer(3,GL_FLOAT,0,g_colorArray), so i tought i cuold just alter the function call providing the fourth component (alpha channel), like a glColor4f function, but i guess these are not similar. Do you have any suggestion ? Thanks !
Have you enabled the color array ?
glEnableClientState(GL_COLOR_ARRAY);//?
The result of the color array : per-vertex-lighting
http://www.geocities.com/cippyboy_7/lightmap.jpg
glEnableClientState(GL_COLOR_ARRAY);//?
The result of the color array : per-vertex-lighting
http://www.geocities.com/cippyboy_7/lightmap.jpg
Relative Games - My apps
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement