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: Drawing Circle that changes color dynamically

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2004
    Location
    Ripperside
    Posts
    1

    Drawing Circle that changes color dynamically

    Could anyone point me in the right direction of drawing 2d (or 3d doesnt matter) circles in a window, and allowing for them to dynamically change colors as values from another part of the code i wrote change.

    Im having problems finding working examples that I could use to see how anyone of this is done

    Thanks in Advance

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,651

    Re: Drawing Circle that changes color dynamically

    Hi !

    I am not sure what the problem is, if you need help with the circle itself search this forum, it has been answered before.

    When it comes to color, the easiest thing to do is:
    Code :
      glDisable( GL_LIGHTING);
    and then just use glColor??( r, g, b); to change the color before each glVertex??() call.

    then you just redraw the contents every time the color value changes.

    But I may be missunderstanding what it is you need help with...

    Mikael

Posting Permissions

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