I have the following setup that currently works fine:
glTexImage2D with GL_LUMINANCE (greyscale)
Set primitive material to metalic values
on draw:
glShadeModel ( GL_SMOOTH ) ;
glEnable ( GL_LIGHTING ) ;
glActiveTexture ( GL_TEXTURE0 ) ;
glBindTexture ( GL_TEXTURE_2D, textureId ) ;
glEnable ( GL_TEXTURE_2D ) ;
glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ) ;
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SEPARATE_SPECULAR_COLOR_EXT);
I get a nice shinny metallic surface with a texture on it ranging from transparent to black. The black regions still have reflexions, which is exactly what I want.
Now, I’d like to make that texture “more transparent” with user input. ie: I would like to be able to change the texture from its default look to all transparent.
Does anyone have some pointers? I hope I dont have do actually modify the texture memory!!