PDA

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



John Jenkins
11-04-2002, 06: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
Form2.Show
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
DrawGLScene
SwapBuffers (frm.hDC)
wglMakeCurrent Form2.hDC, hrc
DrawGLScene2
SwapBuffers (Form2.hDC)
DoEvents
wglMakeCurrent frm.hDC, hrc
Loop
End Sub