Archived

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

biovenger

Grr... glRotate3* and Lighting

Recommended Posts

biovenger    122
Alright, as some might have seen in an earlier post today, I just succeeded in loading OBJ files in my engine. Now first, I have a lighting problem. I load all the normals correctly, but the surface is only shaded when I turn on either red, blue or green light. If I have plain white ambient light, or no light at all (default) then the surfaces look flat. You still see what it resembles, but there is no shading at all. Now, secondly. I have two calls to glRotate3f before I draw the triangles that compose the OBJ file. Now, the problem is, it won''t rotate, at all. I can translate in and out, but I can''t rotate it. Why? The object is composed out of simple triangles... I have drawn boxes that can be rotated, but this cannot, why?

Share this post


Link to post
Share on other sites
Prosper/LOADED    100
quote:
Original post by biovenger
Alright, as some might have seen in an earlier post today, I just succeeded in loading OBJ files in my engine. Now first, I have a lighting problem. I load all the normals correctly, but the surface is only shaded when I turn on either red, blue or green light. If I have plain white ambient light, or no light at all (default) then the surfaces look flat. You still see what it resembles, but there is no shading at all.


Seems like you are setting the ambient intensity of your light. Keep the ambient at 0,0,0 but set the diffuse and specular intensity to 1,1,1.

quote:
Original post by biovenger
Now, secondly. I have two calls to glRotate3f before I draw the triangles that compose the OBJ file. Now, the problem is, it won''t rotate, at all. I can translate in and out, but I can''t rotate it. Why? The object is composed out of simple triangles... I have drawn boxes that can be rotated, but this cannot, why?


I can''t think of anything right now, please post the relevant piece of code.

Share this post


Link to post
Share on other sites