I'm trying to follow the bump mapping from the NVidia SDK, and have yet to get it working in a demo I'm doing. Basically I took one texture and used Photoshop to create a grayscale alpha channel version of the original texture adding some height to the texture to give it the "bump" effect. Now as I understand it the textures have to be combined using multitexturing and blending, so I'm trying to do the following:
glEnable(GL_BLEND);
glBlendFunc(GL_ONE,GL_ONE);
glActiveTextureARB(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, m_textures[1]);
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvf (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_REPLACE);
glActiveTextureARB(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, m_textures[3]);
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvf (GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_ADD);
And then I use:
glMultiTexCoord2fARB(GL_TEXTURE0_ARB,...)
glMultiTexCoord2fARB(GL_TEXTURE1_ARB,...)
What am I doing wrong?