Results 1 to 2 of 2

Thread: fading colour

  1. #1
    Senior Member Regular Contributor
    Join Date
    Aug 2000
    Posts
    171

    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

Similar Threads

  1. OpenGL colour not able to render colour
    By mundrapiyush in forum OpenGL: Linux
    Replies: 3
    Last Post: 05-16-2010, 03:15 AM
  2. Fading
    By Asshen in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-26-2004, 06:27 AM
  3. fast fading
    By rilestyle in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-25-2003, 08:08 AM
  4. Fading an object in/out
    By Andrew Jameson in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-01-2003, 10:22 AM
  5. Scene Fading
    By Running_Wolf in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 02-26-2001, 06:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean