OpenGL: Alpha-fading a 32-bit texture

BlitzMax Forums/BlitzMax OpenGL Programming/OpenGL: Alpha-fading a 32-bit texture

My 32-bit textured objects were being added to a zsort stack, which gets sorted and rendered after all solid objects. The post-zsort render was not passing the distance fade value to my RenderSurface() routine.

BTW, I really recommend using a universal RenderSurface() function for all surfaces. This is called after the matrix is set up, and just draws the vertex arrays.