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: fading colour

  1. #1
    Junior Member Regular Contributor
    Join Date
    Aug 2000
    Posts
    173

    fading colour

    I want to set the colour of a cone so that it fades - it is strongest at the point and then fades towards the base

    I'm using glMaterialfv(......) to set the colour

    cheers

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    NL
    Posts
    2

    Re: fading colour

    Originally posted by fox:
    I want to set the colour of a cone so that it fades - it is strongest at the point and then fades towards the base

    I'm using glMaterialfv(......) to set the colour

    cheers
    The easiest way to do it, I think, is making the cone with a GL_TRIANGLE_FAN, and enable smooth shading, glShadeModel(GL_SMOOTH). Now you can specify a new color for each vertex, and the colors of the triangles will smoothly go from black to white or whatever color you want.

    good luck!
    Nigel

Posting Permissions

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