Double Graphics

BlitzMax Forums/BlitzMax Programming/Double Graphics

rdodson41(Posted 2005) [#1]
I doubt this is possible, but is there any way to have multiple windowed graphics windows up? Since it's not like a window, I dont think its possible, but Im just curious to find out if it it.


Perturbatio(Posted 2005) [#2]
It doesn't appear possible, since a second call to bglCreateContext will destroy the old one before creating a new one.

*EDIT*
although I've just hacked the blitzgl.win32.c source and removed the call to glDeleteContext and it appears that you can create two windows. (Wether or not there will be side effects I have no idea).

*EDIT*
On further inspection, it looks like a major hack would be required for this to actually provide any reasonable results since all the other functions depend on certain variables being set.


rdodson41(Posted 2005) [#3]
I guess even if you could get two to appear, theres no setbuffer command, so I dont know how you could draw to both of them. So I guess the only solution would be a GUI MODULE....


Perturbatio(Posted 2005) [#4]
actually, if you knew enough about it (and if two GL contexts will work together), there's no real reason you couldn't add a SetContext() command, all it would need to do (from what I can see) is change the values of the relevant variables.
(i.e. context_hdc, context_hwnd,HGLRC context_hglrc)


ImaginaryHuman(Posted 2005) [#5]
I'm fairly sure you should be able to create multiple contexts using direct OpenGL, and set which buffer you want to draw to as well. Not sure exactly how you navigate to a different context but it should be possible.