PDA

View Full Version : points and triangles



hamzat
04-16-2001, 10:12 PM
Hi all,
In my app I have to visualise GL_POINTS and GL_TRIANGLES. My triangles are with lighting. My points have to be without lighting. When I visualise points only I turn of the lighting, when I draw triangles only I draw them with lighting. I tried to draw the points with lighting also but when I rotate the scene they have different colors. How could I visualise both points without lighting and triangles with lighting on one scene?
Thank you in advance.

Eric
04-16-2001, 10:58 PM
You are probably going to get busted because this REALLY belongs to the Beginners forum.... http://www.opengl.org/discussion_boards/ubb/smile.gif

Anyway, here is the way to do it:




glDisable(GL_LIGHTING);
RenderMyPoints();
glEnable(GL_LIGHTING);
RenderMyTriangels();


You are not forced to have all you scene lit... You can call glDisable/glEnable with GL_LIGHTING as a parameter whenever you want (except between glBegin and glEnd, that is !).

Regards.

Eric