PDA

View Full Version : 2 openGL dialogs with thinbasic?



largo_winch
10-05-2011, 10:46
(for petr or anybody else who has big knowledge)

hello. it's possible to create 2 openGL (tbgl) dialogs using button controls? regards, largo

Petr Schreiber
10-05-2011, 11:56
Hi largo_winch,

I think I answered this in my previous post (http://www.thinbasic.com/community/showthread.php?11100-looking-for-sphere&p=83008&viewfull=1#post83008). Only one surface can be active at time.

By specification, it is possible to have multiple OpenGL windows, but as my experiments last year showed, sharing texture, display lists and VA/VBO between contexts leads to serious issues even on some pieces of modern hardware (rendering ok, but it corrupted Aero), I did not implemented this feature to TBGL core yet. I want TBGL to have only features, which can users rely they will work everywhere. Once the driver situation gets better, I will think about it.

I am going out now, will think how to achieve what you need with current TBGL in the mean time. It should be possible via precise switching. I will let you know once I know more.


Petr

Petr Schreiber
10-05-2011, 14:12
Well, I tried, I managed to get two scenes render indepenently, but I still strongly disrecommend it, as it is continuous creation-destruction set.

Have a look to the attachement, quite crazy. You will need ThinBASIC 1.8.7.0, as I created new code from scratch:


Main.tBasic - main app
dialog_First.tBasicU - first dialog unit
dialog_Second.tBasicU - second dialog unit


Petr

largo_winch
10-05-2011, 23:54
many thanks petr, I thought it would be functionable with different hwnd(i) for different mainframes I have soon from some freebasic stuff. I will check you current code example and give some answers if I understood ;). good night, bye, largo
ps: what do you think about "demos" with openGL and musicians? with few code lines? see my posts I have sent to shoot box area
link: http://www.thinbasic.com/community/showthread.php?11151-revision-2d-3d-demo-party-%28saarbr%FCcken%29&p=83278#post83278