mfc and wglCreateContext()

[b][red]This message was edited by alakese at 2004-9-13 8:46:18[/red][/b][hr]
Hi,

I need information about wglCreateContext().

1- I call CMyOpenGL::OnPaint() every second.
2- I use wglCreateContext() and wglDeleteContext() in it,
I want user to push a button and save the image! Because of wglDeleteContext() that does not happen.
3- i tried to create in OnCreate(), and destroy OnDestroy()
but then i don t see anything,

Does anyone know this behavior


Comments

  • i dont use MFC but with simple win32-api and opengl its the best to include your render-scene-func in the message-loop for your window (for animated scenes).however its not a good idea to create a new rendercontext each frame and release it after drawing.create one context at application startup and release it before exiting.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion