Results 1 to 2 of 2

Thread: colour smoothening

  1. #1
    Member Newbie
    Join Date
    Mar 2002
    Posts
    34

    colour smoothening

    Does anybody know (mathematically) how OpenGL smoothens colours across primitives that are drawn. i.e. if I draw a line:

    glBegin(GL_LINES);
    glColor3f(1.0, 0.5, 0.0);
    glVertex3f(0.0, 0.0, 0.0);
    glColor3f(0.5, 0.0, 0.3);
    glVertex3f(2.0, 0.0, 0.0);
    glEnd();

    how does it calculate the chosen RGB values all along the line based on the RGB values for the end points? What is the mathematical relationship?
    Thanks.

    [This message has been edited by Rajveer (edited 04-23-2002).]

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2011
    Posts
    288

    Re: colour smoothening

    Originally posted by Rajveer:
    Does anybody know (mathematically) how OpenGL smoothens colours across primitives that are drawn. i.e. if I draw a line:

    glBegin(GL_LINES);
    glColor3f(1.0, 0.5, 0.0);
    glVertex3f(0.0, 0.0, 0.0);
    glColor3f(0.5, 0.0, 0.3);
    glVertex3f(2.0, 0.0, 0.0);
    glEnd();

    how does it calculate the chosen RGB values all along the line based on the RGB values for the end points? What is the mathematical relationship?
    Thanks.

    [This message has been edited by Rajveer (edited 04-23-2002).]
    This can be explained precisely in the spec of OpenGL such as:
    http://www.opengl.org/developers/documen...000000000000000

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. smoothening rectangle shape ?
    By H.R.N in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 05-11-2009, 01:08 AM
  3. colour order BGR
    By mr_coolio in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 02-11-2003, 05:34 AM
  4. Different colour for TGA font
    By cyam95 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-09-2002, 07:31 AM
  5. colour
    By fox in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-21-2001, 07:47 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