OpenGL - lighting of vertices outside clip range

Posted by hmp on Stack Overflow See other posts from Stack Overflow or by hmp
Published on 2010-05-18T21:02:08Z Indexed on 2010/05/21 6:20 UTC
Read the original article Hit count: 230

Filed under:
|

I have a problem with lighting in my OpenGL application. When one of the vertices of a drawn polygon goes outside the front clip plane (or has z<0, I'm not sure which), the polygon stops being lighted properly.

This however happens on only one machine I tested, with Intel GMA950 card. On nVidia and ATI cards everything looks fine.

I guess I am breaking some OpenGL rule here? How should I deal with it?

I'd try dividing the scene into smaller polygons, but I'm not sure if it guarantees the case is eliminated (all polygons stepping outside the clipping range are offscreen).

© Stack Overflow or respective owner

Related posts about opengl

Related posts about 3d