View Full Version : I finally figured out how to draw on more than RC.(Here is the code)

John Jenkins
11-04-2002, 05:13 AM
I use VB and use the NEHE examples as my start. Here is my main function.
If you guys see anything that looks redundant or superfulous tell me. Or if you know a better or simpler way tell me. I tested this a bit and it looks like all are needed to run and redraw properly.

Sub Main()
Dim Done As Boolean
Dim frm As Form
Done = False
fullscreen = False
' Create Our OpenGL Window
Set frm = New Form1
CreateGLWindow frm, 640, 480, 16, fullscreen
CreateGLWindow Form2, 640, 480, 16, fullscreen
wglMakeCurrent frm.hDC, hrc
Do While Not Done
SwapBuffers (frm.hDC)
wglMakeCurrent Form2.hDC, hrc
SwapBuffers (Form2.hDC)
wglMakeCurrent frm.hDC, hrc
End Sub