lighting in opengl problem
Hi. I looked up nehe''s tutorial on lighting and I pasted it in my gl code-now everything is grayscale(except the background). No color at all, and when I load textures everything is brownscale(?), including the textures. What is going on? I''m running 640x480x16 on a voodoo 3.
May 12, 2001 06:57 PM
Didn''t you forget to add normals to your polygons? Just thought I''d ask, since you said you pasted the code.
Did you set your material properties?
I dont know what you know or dont know about lighting, but this kind of stuff generally happens when no material properties where set to your objects.
NeHe got a good tutorial on this, maybe it would worth a look.
-The Atomic Mouse
I dont know what you know or dont know about lighting, but this kind of stuff generally happens when no material properties where set to your objects.
NeHe got a good tutorial on this, maybe it would worth a look.
-The Atomic Mouse
For coloring try calling glEnable(GL_COLOR_MATERIAL); when setting up the RC. This will do the job of setting the material parameters automatic, when you set the color. For further details look at Nehe''s Tuts or the RedBook, or anything else you want to.
Texturing should work fine, without glEnable(GL_COLOR_MATERIAL);, try to set color to white before, and don''t forget to enable texturing.
Normals must be set up.
Greetings Ben
Texturing should work fine, without glEnable(GL_COLOR_MATERIAL);, try to set color to white before, and don''t forget to enable texturing.
Normals must be set up.
Greetings Ben
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement