Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Stupid question

  1. #1
    Member Contributor
    Join Date
    Jul 2003
    Location
    va beach
    Posts
    63

    Stupid question

    It's hot out today so I'm lazy. Don't wanna search take your pick. Anyway anyone know the glColor3f(); for white?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Stupid question

    Must have been just as lazy in school during science class...

    glColor3f( Red, Blue, Green )

    Red + Blue + Green = White

    1, 1, 1


    Originally posted by c0d3Junk3Y:
    It's hot out today so I'm lazy. Don't wanna search take your pick. Anyway anyone know the glColor3f(); for white?

  3. #3
    Member Contributor
    Join Date
    Jul 2003
    Location
    va beach
    Posts
    63

    Re: Stupid question

    Sorry I didn't specify background color.

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    763

    Re: Stupid question

    wtf?

    oh... you wanted white for the background colour. that's not the same as white for the foreground colour, as you keenly observed. to convert any foreground colour into a background colour you just need to subtract 1.0 from the colour values. so, the background colour for white is 0.0, 0.0, 0.0 (1.0-1.0, 1.0-1.0, 1.0-1.0). beginners often stumble over this problem.

  5. #5
    Member Contributor
    Join Date
    Jul 2003
    Location
    va beach
    Posts
    63

    Re: Stupid question

    LOL We oft stumble over more than just that.

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Stupid question

    You can set the color in which to clear to.

    // R, G, B, A
    glClearColor (1.0, 1.0, 1.0, 1.0);

    Originally posted by c0d3Junk3Y:
    Sorry I didn't specify background color.

  7. #7
    Junior Member Newbie
    Join Date
    Jul 2003
    Location
    Perpignan, France
    Posts
    15

    Re: Stupid question

    No questions are stupid, when you don't know you don't know.
    There are just hard questions and easier questions.

  8. #8
    Senior Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    763

    Re: Stupid question

    ... or, my personal favourite:
    http://www.thinkgeek.com/images/prod...uelessness.jpg

    (not that I'm saying its applicable in this case, mind you)

  9. #9
    Member Contributor
    Join Date
    Jul 2003
    Location
    va beach
    Posts
    63

    Re: Stupid question

    Thanks john LOL. BTW love the pic.

  10. #10
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Stupid question

    Originally posted by john:
    wtf?

    oh... you wanted white for the background colour. that's not the same as white for the foreground colour, as you keenly observed. to convert any foreground colour into a background colour you just need to subtract 1.0 from the colour values. so, the background colour for white is 0.0, 0.0, 0.0 (1.0-1.0, 1.0-1.0, 1.0-1.0). beginners often stumble over this problem.

    LOL! Nice response John.
    Deiussum
    Software Engineer and OpenGL enthusiast

Page 1 of 2 12 LastLast

Similar Threads

  1. Another stupid question
    By ViKt0r Erdelyi in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-08-2005, 04:33 AM
  2. very stupid question!
    By in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 05-11-2004, 01:18 AM
  3. stupid stupid question - Installing OpenGL?
    By JonnyW in forum OpenGL: Linux
    Replies: 3
    Last Post: 02-01-2004, 05:44 PM
  4. stupid question
    By blt8 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-28-2002, 11:56 AM
  5. Maybe a stupid question
    By J_Ramone in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-04-2001, 12:29 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