Results 1 to 3 of 3

Thread: Changing Bkgrnd color from Black to white

  1. #1
    Guest

    Changing Bkgrnd color from Black to white

    Hi..

    newbie question. I just posted something a while ago..but ive found a way around it.

    When opengl is initialized, the normal color seems to be black background...how do i change that to white.

    I want all my drawings to be in white. So that i get white on black .

    thanks
    vikky

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

    Re: Changing Bkgrnd color from Black to white

    Find this string in your program.

    glClearColor (0.0f, 0.0f, 0.0f, 0.5f);


    Edit RGB respectively until desired color is reached.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Sep 2011
    Posts
    150

    Re: Changing Bkgrnd color from Black to white

    [QUOTE]Originally posted by c0d3Junk3Y:
    glClearColor (0.0f, 0.0f, 0.0f, 0.5f);
    QUOTE]

    Then call: glClear(GL_COLOR_BUFFER_BIT);

Similar Threads

  1. Black and white mask
    By Bitblit in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-23-2010, 03:18 AM
  2. black & white
    By zukko in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-19-2004, 11:48 AM
  3. blend the white out and not the black?
    By c_olin in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-08-2003, 02:29 PM
  4. Why its black and white?
    By lsdi in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 01-06-2002, 01:01 AM
  5. Black&White scene
    By Arath in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 10-17-2000, 05:35 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