Advertisement

lost w/ lighting and normals

Started by March 18, 2000 07:41 PM
1 comment, last by ECKILLER 24 years, 11 months ago
Ok i calculated the normals for part of my model and i put it in a normal array. Well it lit a differant part of my object, how messed up is that??? It lit a part where the normals wern''t calculated and it didnt light the part that had the normals. I think the glNormalPointer thing is whats screwing me up. Can someone give me an example using that. Also how do i do glDrawElements since normals don''t have a type--ie GL_TRIANGLES? I put points in my program for type but i also tried commenting glDrawElements out and it didn''t change anything it still lit(the wrong part) while i was expecting no light at all when it was commented out. Ugh please help, lighting is the last part of my scene and i''ve been staring at my monitor way to long Like i said a descent example explained a bit on the normal pointer and how to use it. Thanks a lot. ECKILLER
ECKILLER
Are you POSITIVE you are calculating your normals correctly??? I don''t know of any way Open GL does it for you, you have to determine them on your own. I can post you the function if you want, just lemme know.
Advertisement
Yes i''m calculating them right. Got the formula straight from the red book. Need example on how to use the glNormalPointer, as the red book only explains the glVertexPointer. And it appears they work a little bit diferant and that little bit is whats messing me up.

ECKILLER
ECKILLER

This topic is closed to new replies.

Advertisement