Sign in to follow this  
pixelhead

global alpha + glColorPointer

Recommended Posts

Hi - I am using a per vertex color via VBOs and glColorPointer. The per vertex colors are currently RGB, no alpha. Is there a way to specify a global alpha that affects the colors in the glColorPointer? My vertex count is pretty high so I wanted to avoid locking the VBO every time the alpha is changed. Thanks.

Share this post


Link to post
Share on other sites
From what I've read, setting a 3 channel color in openGL implicitly sets the alpha component to 1, so there is probably no easy way of doing this.

I think your best bet would be to remove your per-vertex color information (use a texture instead, if possible) and just call glColor4[blah] before you draw the mesh.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this