I have an interesting dilemma....Tonight I finally figured out how to implement bumpmaps but for some reason just as soon as I add them in all my textures go black except for spectural light....I am using glMaterial to colorise and have blending disabled but unfortunately this also disables my ability to properly colorise the base texture....
Here is a simple rundown of what I do to enable my bumpmaps and draw...
glDisable(GL_BLEND);
glActiveTextureARB(GL_TEXTURE1_ARB);
glBindTexture(GL_TEXTURE_2D, id1);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE);
glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_PREVIOUS_EXT);
glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND0_RGB_EXT, GL_SRC_ALPHA);
glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_TEXTURE);
glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND1_RGB_EXT, GL_SRC_COLOR);
glEnable(GL_TEXTURE_2D);
// The DOT3 Bumpmap Texture
if (g_useEXTdot3) {
glActiveTextureARB(GL_TEXTURE0_ARB);
glBindTexture(GL_TEXTURE_2D, id2);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_DOT3_RGBA_EXT);
glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_PRIMARY_COLOR_EXT);
glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND0_RGB_EXT, GL_SRC_COLOR);
glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_TEXTURE);
glTexEnvf(GL_TEXTURE_ENV, GL_OPERAND1_RGB_EXT, GL_SRC_COLOR);
glEnable(GL_TEXTURE_2D);
}
glMaterialfv(GL_FRONT, GL_AMBIENT, white);
glMaterialfv(GL_FRONT, GL_DIFFUSE, white);
glMaterialfv(GL_FRONT, GL_SPECULAR, white);
glMaterialf(GL_FRONT, GL_SHININESS, 100);
all the drawing stuff
It bumps just great and draws the texture underneath but it seems to me the regular material color commands arent going to cut it here...because I only get a small patch of light on my quad like a large specular reflection....Is it something to do with my combiners? Do I have to add in some extra combiners to get it to be properly lit? All I know is everything went to black when I added bumpmaps...I take them out and everything looks fine...
Heres a sample image of what it looks like when bumps are enabled...
http://celestialvisi...t/pics/bbm1.jpg
And disabled:
http://celestialvisi...t/pics/bbm2.jpg
Its still dark but its the random color that was chosen for that planet...












