LightMaps
Ok...I know WHAT a light map is. I understand the theory.
However.. i don''t know anything about multipass texturizing in OpenGL. Some source would be nice.
-Paul
June 28, 2000 04:18 PM
Multi-pass texturing is when you first draw the original texture (say a brick wall) and then after that you draw the lightmap on top of it, using blending to make the first look all nice and pretty. Here''s some OpenGL pseudo source for you:
There is the psedo code to do multi-pass texturing with OpenGL. Some video cards (most of the new ones) support single pass multi-texturing through extensions which you should look over since it will increase the speed quite a bit. Hope this helps!
glBindTexture(GL_TEXTURE_2d,texture[0]); // the original glBegin(GL_QUADS); // draw the quad with texture coordinatesglEnd();glEnable(GL_BLEND); // enable blending for lighmapglBlendFunc(GL_DST_COLOR,GL_ZERO); // set blend functionglBindTexture(GL_TEXTURE_2D,lightmap[0]); // the lightmapglBegin(GL_QUADS); // Draw the lightmap in the same place as the first quadglEnd();glDisable(GL_BLEND);
There is the psedo code to do multi-pass texturing with OpenGL. Some video cards (most of the new ones) support single pass multi-texturing through extensions which you should look over since it will increase the speed quite a bit. Hope this helps!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement