Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: points and triangles

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Ukraine
    Posts
    8

    points and triangles

    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.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Feb 2000
    Location
    France
    Posts
    1,118

    Re: points and triangles

    You are probably going to get busted because this REALLY belongs to the Beginners forum....

    Anyway, here is the way to do it:

    Code :
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •