Archive for the ‘OpenGL’ Category

Rendering models with transparent textures

January 8, 2009

I was having problems rending low polygon trees in my scene. It was because they used transparent textures which are always problemic. I found this artical that helped me greatly:

http://www.sjbaker.org/steve/omniv/alpha_sorting.html

The solution was to render all opaque objects first, then do:

glAlphaFunc(GL_GREATER, 0.1f);
glEnable(GL_ALPHA_TEST);
and now every thing renders perfectly