PDA

View Full Version : Problems with multiple windows in Win98



Cyrius
05-22-2000, 08:49 AM
First off, I must say this site is awsome. I love the new BB format! Now, on to the problem:

Ok, I have this program I orignially wrote on a SunOS machine which opens two windows and renders to both of them - each window has its own display, mouse_motion, and reshape callbacks.

Well, I tried to port the thing to Win98 (as I have many other SunOS programs I wrote) and the program runs well except it never calls the second windows display function. It will call the second window's mouse_motion function, but glutPostRedisplay() simply doesn't work on the second window. The glutPostRedisplay() call is made, but the program never enters the second windows display callback. The original window works fine. I can manually call the second window's display function, and it draws, but as you know this kind of thing causes problems, and I'd rather have the program working as it was ment to... http://www.opengl.org/discussion_boards/ubb/smile.gif

Do I need to grab hold of a windows device context or something? I found that the create window calls are returning valid integer ID's, so I don't think a device context is the answer. Ah well, any help would be greatly appreciated...

Siwko
05-23-2000, 06:41 AM
Before switching rendering windows, issue a call to wglMakeCurrent() with the appropriate parameters to the window of interest. You'll need the window's DC and rendering context to do so, and I am not certain of how to do this in glut (though glut should do it by itself???).

It sounds like the app (or glut) is actually not actualizing the correct rendering context for the window. That 'should' help. I hope. http://www.opengl.org/discussion_boards/ubb/smile.gif

Siwko