PDA

View Full Version : two windows - one way road only ??



gummibaer
04-13-2011, 12:41 PM
Hi,

I am beginning OpenGL in a windows installation with just the installation incorporated in win32API.

I would like to work with two windows both showing OpenGL scenes. Creation of the first window, arranging my scene and operating my controls works just fine. Same with the second window, creation, arranging of scene and controls work just fine. Problem begins, when I return to window 1. It does not respond to any messages any more. In my debugger, I still see the handle of this window, device context and all are still the same values as before creation of window 2, but window 1 does not respond any more.

Where to start to look ? Any hint would be highly appreciated.

Norbert

McLeary
04-13-2011, 01:07 PM
Which window system you are using?

gummibaer
04-13-2011, 02:18 PM
Got it.

After I put wglMakeCurrent in the code handling the WM_PAINT message, all is fine. (Chapter 19 of OpenGL Superbible).

Norbert

V-man
04-14-2011, 04:00 PM
He is asking about this
http://www.opengl.org/wiki/Platform_specifics:_Windows#Multiple_Windows