Skip to main content
GameDev.net gamedev.net
🔒 Locked

Whats wrong here ?

Started by nildo Jun 2, 2003 at 10:00 AM 2 replies 250+ views
Original Post
nildo
nildo
I use this routine to make an ilumination of my 3d world. I put it before using all the glVertex3F of thw walls and the floor. glShadeModel(GL_SMOOTH); glEnable(GL_DEPTH_TEST); glEnable(GL_COLOR_MATERIAL); glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, @especular); glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, 120.0); glLightfv (GL_LIGHT0, GL_SPECULAR, @especular); glLightfv (GL_LIGHT0, GL_POSITION, @position); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); But this routine ilumminate all my walls and my floor like they are only 1 object. But they are separated. I want to iluminate my 3d world, with the light of the sun. How to do ? Ps.: My 3d world only have walls and a floor.
nildo
nildo
Ahhh thats it !!!! Its missing the Normals.
How to create them ?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.