Initialization question

Hi!

All of my OpenGL test applications seem to leave the last buffer in memory. That means, when I start app 1 that draws a Triangle and close it and start app 2 that should display nothing but a black screen, I still can see the triangle of the last app. Can anyone give me a hint what I have to do to prevent this? I am using MFC.

regards,
steve

That means, when I start app 1 that draws a Triangle and close it and start app 2 that should display nothing but a black screen, I still can see the triangle of the last app.

steve_j,

If your screen is not black, then clear it:

glClearColor(0,0,0,0);
glClear( GL_COLOR_BUFFER_BIT );

Hi!

Thanks for that hint, I had the glClear Command not in the OnPaint function. Now it works like it should.

regards,
steve

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.