multiple glwindows

Started by
1 comment, last by glGreenhorn 22 years, 3 months ago
hey just out of curiosity... is it possible to create multiple simultaneously running glwindows (eg use them like the UT map editor uses D3D in perspective view)? moreover, is it possible to project a glscene onto eg a dialog box or a Win32 control? keep cool
Advertisement
Yes, both is possible.
to the first one: you have to save some DC''s and RC''s (for every one window you want), actually i haven''t tested it in VC6 but i did something in Delphi5, here''s the code for switchin the windows:

wglMakeCurrent(getDC(ViewPort.Handle),ViewPorts_Stat[ID].RC);

ViewPort is a simple TPanel and in ViewPorts_Stat[ID].RC i saved the RenderingContext of this specific window
you get the RC with:

ViewPorts_Stat[ID].RC:=CreateRenderingContext(getDC(ViewPort.Handle),[opDoubleBuffered],0,0,0,0,0);
ActivateRenderingContext(getDC(ViewPort.Handle),ViewPorts_Stat[ID].RC);

to the second one: you can turn everything into an GLwindow, as long as you can get the DC of this object
hey, life has to go on
thanx EC_ToASter

This topic is closed to new replies.

Advertisement