PDA

View Full Version : glClear seems to fail



hamburger
07-10-2014, 09:07 AM
Hello folks :-)

i'am currently trying to programm an openGL overlay for another programm. I'am using sdl as the Window manager.

my problem:

i got 2 test programms.

- the first one is a simple console application. The code works fine everything works as expected.

- the second programm is a QT-GUI-Application. The drawing also works excepted that the glClear don't seems to work.

in both programms the drawing code is 100% the same!

i create a seperate thread in both programms (std::thread)

does anyone got the same situation or knows a solution how to resolve the problem?


thanks alot and greetings from germany!

mhagain
07-10-2014, 02:12 PM
Are you clearing both the color and depth buffers, or just the depth buffer? If the latter, there are some specific reasons why a clear may fail (one of them is that GL didn't give you a depth buffer during startup), so it's important to know.

hamburger
07-10-2014, 04:18 PM
Okay.. i outsourced it into dll and now it woks.. you can close the topic // thanks for your answer!