Results 1 to 3 of 3

Thread: glColor() problem

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Posts
    21

    glColor() problem

    Hi,
    In my application when i am getting the current color, it gives (0,0,0,0). I am not calling glColor() function.

    But in glColor() documentation i saw the following line.

    The initial value for the current color is (1, 1, 1, 1).

    What is the reason for that?

    Thanks,
    Kannan A S

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: glColor() problem

    Do you use any vertex arrays with a color buffer? If so, maybe black is the last color used in that array. Another thing is that you haven't created a rendering context before getting the current color.

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    The Netherlands
    Posts
    24

    Re: glColor() problem

    Why bother getting the color values? It is cheaper to always set the color, even when you are setting it to the current color (according to the red book)

    Ritchie

Similar Threads

  1. trying to get 1st program to run : glcolor problem
    By meemoeuk in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-24-2016, 12:10 PM
  2. glColor problem
    By aus79er in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-28-2002, 10:08 AM
  3. glColor
    By jenny in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-22-2002, 07:13 PM
  4. glColor Problem
    By suresh kannan in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-10-2001, 05:57 AM
  5. Crazy glColor problem
    By ribblem in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-06-2000, 09:22 PM

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