colour

Hi

any reason why red appears as black in my scene - I used to be able to see red but for some reason it now shows as black - how can i rectify this

Does any other color work? Do you use textures, lighing or anything else that affects the final color?

Originally posted by Bob:
Does any other color work? Do you use textures, lighing or anything else that affects the final color?

yes blue and green work perfect
I’ve enabled depthtesting in initGL()
I do use texture mapping -this problem occured since I started using opengl fonts - so if i click over an object it gives it’s label but if for instance I choose the material of the label to be redish as below it actually appears blue - even though I disable depth testing before drawing the labels - this also affects other objects where I can’t get red
GLfloat diffuse[4]={0.7, 0.3, 0.3, 1.0};
glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_emission);

thanx

[This message has been edited by fox (edited 03-21-2001).]

By default OpenGL uses the GL_MODULATE for the texture enviroment paramater. This will cause the material and textures to be blended together. Is it the actual material color you want to show, or the texture? If it’s just the material color you want, disable textures before drawing… if you want the texture to show without blending you can do

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE /or GL_DECAL/);

Or you can make your material white…

cheers - I’ll try that