PDA

View Full Version : shadow mapping when using multitextures



JanHH
04-21-2005, 05:08 AM
Hello,

this might be a very stupid question, sorry.. I am trying to implement shadow mapping (very simple version, like in the tutorial on paulsprojects). However, my 3d engine uses multitexturing. I decided to use TU 3 for the shadow map.

For using shadow mapping, several texturing parameters have to be set, like
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
glTexGenfv(GL_S, GL_EYE_PLANE, textureMatrix.GetRow(0));
glEnable(GL_TEXTURE_GEN_S);

etc.

I guess, I can use these commands just as they are, but before doing so, I have to call
glMultiTextureARB(GL_TEXTURE3_ARB)?

Am I right or is it more complicated? Something must be wrong with my program, as shadow mapping is not yet working..

Regards,
Jan

dorbie
04-22-2005, 02:01 AM
Yes this will work provided you have enough fully supported ARB multitexture units.