PDA

View Full Version : What is wrong with this code?



John Jenkins
11-01-2002, 01:00 PM
I have been playing with different ways of creating different RC's and wglMakeCurrent. This code will draw two different scenes onto two different forms. However, the second form is not redrawing correctly. I don't have any animation so I don't know if it is just drawing once and then stopping.
fullscreen = false 'never mind the next
two statements they just are part of NEHE
CreateGLWindow frm, 640, 480, 16, fullscreen
CreateGLWindow2 Form2, 640, 480, 16, fullscreen
wglMakeCurrent frm.hDC, hrc
Do While Not Done

DrawGLScene
SwapBuffers (frm.hDC)
DoEvents
DrawGLScene2
wglMakeCurrent Form2.hDC, hrc2
SwapBuffers (Form2.hDC)
DoEvents
wglMakeCurrent frm.hDC, hrc


Loop


[This message has been edited by John Jenkins (edited 11-01-2002).]

opla
11-01-2002, 02:02 PM
Looks like you're drawing nothing in window2

try:
wglMakeCurrent Form2.hDC, hrc2
DrawGLScene2
SwapBuffers (Form2.hDC)


how can you have 2 fullscreen windows ?

John Jenkins
11-01-2002, 05:16 PM
they are not full screen i will edit it.