Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: background color intially doesn't take

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2012
    Posts
    1

    background color intially doesn't take

    Hi,

    I'm new to this forum and have a problem I think is pretty basic. I'm using .NEt c# and a opengl wrapper on Windows 7. I use the glClear(GR.GL_COLOR_BUFFER_BIT | GR.GL_DEPTH_BUFFER_BIT) to clear the background. I then set the background color, the screen flickers with the right background color but then reverts to a white background. If I click on the screen the background changes to the right color. This is driving me mad trying to figure it out! Does anybody have a clue as to why its happening?

    Brad

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    723
    I don't use .NET but with MFC you can see this sort of problem with a window doing an erase background event after your draw. In MFC it pays to override the default erase background enet with a nop function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •