Archived

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

penetrator

light and z-buffer

Recommended Posts

because of z-buffer troubles, i had to : gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,1000,50000); now, when i draw an object, i draw it at 1000 z-distance, like this: glLoadIdentity(); glPushMatrix(); glTranslatef(0,0,1000); int sc = 1000; glScalef (sc,sc,sc); of course i have to scale it otherwise is so small that can''t be seen. Object is correctly displayed, but the problem is with light: i tried to position light near the object, but probably i can''t understand where to, because the scene is quite dark ... glHorizon_Project

www.web-discovery.net

Share this post


Link to post
Share on other sites
http://www.frii.com/~martz/oglfaq/
when u scale something your normals become screwed up + u need to renormalize them. u can do it automatically in opengl, though i forget the syntax at the moment check tyhe lighting section of the faq

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites