I copied the tutorial at gametutorials.com but it isn't working
Stencil shadows not working
Fixed, I didn't know that the model texture was interfering with the shadow map.
Now I use multi-texturing:
Now I use multi-texturing:
glActiveTextureARB(GL_TEXTURE0_ARB);
glUniform1iARB( texture1, 0 );
glActiveTextureARB(GL_TEXTURE1_ARB);
glUniform1iARB( texture2, 1 );
glActiveTextureARB(GL_TEXTURE2_ARB);
glUniform1iARB( shadowMap, 2 );
I got the GLSL shadows working from a different example but now the bitmap fonts don't work with the shaders. Anybody know why?
Oh, fixed. I had to do this before rendering text:
glActiveTextureARB(GL_TEXTURE0_ARB);
glDisable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, NULL);
glActiveTextureARB(GL_TEXTURE1_ARB);
glDisable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, NULL);
glActiveTextureARB(GL_TEXTURE0_ARB);
glDisable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, NULL);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement