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: Use the same Color for a set of vertex

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2003
    Posts
    8

    Use the same Color for a set of vertex

    I have a display list with a huge number of vertex, because this vertex have all the same color is there a way to use the display list sharing a single information like color(but also normal or other) between them?
    I can not use glColor() before to call display list in any case.

    Thank you.

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: Use the same Color for a set of vertex

    Put the glColor call *in* the display list, ONCE at the beginning, or call it before the display list is called.

    OpenGL is a state engine, everything you set stays that way until you set it again, including color. So to share color, normals etc, you just set it once and leave it alone, it won't change until you tell it to.

Posting Permissions

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