I did some further tests to ensure the the Opengl Windows were truly independent in terms of viewport proportions and found there was no interference between them.
If the windows are of different size and shape then every time a window is rendered, the viewport and perspective must be respecified.
Charles
'---------------------------
sub PrepareRenderFor(sys n)
'===========================
{
'GET CHILD HANDLE AND DEVICE CONTEXT FOR RENDERING
'
chw=hw[n] : hdc=hd[n]
'
wglMakeCurrent hDC, hRC
'
'SET THE VIEWPORT AND PERSPECTIVE
'
rect crect
GetClientRect chw,&cRect
glViewport 0, 0, crect.right, crect.bottom
double aspect=crect.right/crect.bottom
'
glMatrixMode GL_PROJECTION
glLoadIdentity
gluPerspective 45, aspect, 1.0, 100
glMatrixMode GL_MODELVIEW
glLoadIdentity
'
glClear GL_COLOR_BUFFER_BIT OR GL_DEPTH_BUFFER_BIT
}
The example below should be placed in examples\gui
.