Jump to content
  • Advertisement

Archived

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

biovenger

Grr... glRotate3* and Lighting

This topic is 5431 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!