PDA

View Full Version : registering callbacks?



dovkruger
02-12-2004, 02:21 PM
I am interested in creating more than one window in the same process. When I register a callback, the call has no parameter indicating which window is relevant. How can I tell?

Also, if there are two separate windows, with two identical scenes, and the only difference is the viewpoint, is there any standard way of rendering twice without redrawing the same scene, just changing the viewpoint?

thanks,
Dov

Relic
02-12-2004, 10:59 PM
Is this GLUT? Never tried.
For Win32 API you can easily specify different window procedures and or put private data to the window with SetWindowLong(GWL_USERDATA), GetWindowLong(GWL_USERDATA).

Think of the viewport as a final scale matrix, all geometry has to go through it again for a differently sized image.

02-13-2004, 01:07 AM
To render two times the world with only minimal changes, uses display lists to store the common parts. You may have to wglShareLists to make it work across rendering contexts.