Advertisement

use of glColorPointer

Started by June 14, 2003 03:51 PM
2 comments, last by penetrator 21 years, 8 months ago
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 blending?
Advertisement
glEnable(GL_BLEND) <---
that''s it
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

Relative Games - My apps

This topic is closed to new replies.

Advertisement