Archived

This topic is now archived and is closed to further replies.

Transparent Box?

This topic is 5750 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When doing blending, we need to order the object to be draw back to front. Though, when drawing a box that is a vertex array, I can not change the order in which the faces are drawn. How can I still have my box look OK from everyside?

Share this post


Link to post
Share on other sites
if you dont want to presort the object data (still presort at object level) do:
glDepthMask(FALSE);
draw object
glDepthMask(TRUE);

//following part not needed if you presort at object level, and dont need to write z-values of the object
glColorMask(FALSE, FALSE, FALSE, FALSE);
draw object
glColorMask(TRUE, TRUE, TRUE, TRUE);

Share this post


Link to post
Share on other sites
True, but in most cases it will still look OK even if you don''t z sort your polygons. It depends what sort of thing you are doing. My sorting routines are well slow so I usually just put up with the risk of things occasionally looking a bit wrong.

-

Geocyte Has Committed Suicide.

Share this post


Link to post
Share on other sites