Archived

This topic is now archived and is closed to further replies.

Keef

Vertex Shaded, Textures + Lighting

Recommended Posts

Keef    122
Argh! I''m trying to combine vertex based shading with a blended texture and lighting and it''s not working..but.. I can sucessfully combine any 2 out of these 3 (ie vertex shading +texture belnding works fine, vertex shading+lighting works fine, lighting+texture works fine). What happens is that when I enable lighting the texture seems to dominate the surface color - the vertex shades seem to be ignored. If I disable lighting then the surface is nicely shaded and blended with the texture. I''m fairly sure the lighting normals and the light is set up correctly as the surfaces are correctly shadowed - they just don''t show any coloration from the vertex shades (ie all surfaces are a uniform gray - the same color as the texture). I am using the GL_MODULATE texture environment mode and a single light with diffuse and ambient components. The texture is RGBA , the surfaces are simple GL_TRIANGLES and I''m using the GL_SMOOTH shade model. Is there anything obvious I have missed here? Cheers Keef ----------------------- glDisable(WORK); glEnable(GL_CODING);

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Try changing material properties... ...?

glEnable(GL_COLOR_MATERIAL);
glMaterialfv(GL_FRONT, GL_DIFFUSE, something);

Share this post


Link to post
Share on other sites