Sign in to follow this  
jimmyh

Colour Key And Z Buffer

Recommended Posts

Does any one know if colour key values in a texture get written to the z buffer? If so can i turn it off? Cheers. Jimmy.

Share this post


Link to post
Share on other sites
I dont know exacly what you mean but.
Something like this?.. well it disable the color back on the texture.


glDisable( GL_LIGHTING );
glDisable(GL_FOG);
glEnable( GL_ALPHA_TEST );
glAlphaFunc( GL_GREATER, 0. );
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );

BindTexture()....

renderThing..

glDisable( GL_BLEND );
glEnable(GL_FOG);
glEnable( GL_LIGHTING );





using the glAlphaFunc( GL_GREATER, 0. );

Share this post


Link to post
Share on other sites
Your a god!!!

It was the alpha func that i needed to do.

That has fixed it, cheers.

P.S I'm working with DirectX.

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