Great!
I especially like "Test 1" with mouse movements and right/left button pressed.
This project is a PlayPen for exploring User Interfaces for thinBasic with TBGL and O2. You have probably seen some earlier manifestation of this before.
So far it includes:
- Dynamic control creation / deletion
Oxygen program editbox (controling color)
Tracking of mouse
Tracking of TextBox Caret (Char index)
Object rotation (left button)
Object Translation (right button)
This posting will be updated often - I hope it proves to be useful - like the curate's egg (Alright in parts!)
Charles
Great!
I especially like "Test 1" with mouse movements and right/left button pressed.
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Very nice Charles,
I liked the mouse manipulation too!
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Hi Petr,
Is it possible to run many canvases simultaneously within different labels?
Charles
Hi Charles,
currently not. As help file says :P, only one window or canvas at the same moment is possible.
This limitation is there due to garbage collection and object (textures/models/display lists) sharing.
I investigated this before summer, but school made me drive of this part. I will look into it again.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Yes I see complexity there.
One option would be to capture the image of a frame and paint it onto the label, for an inactive control. Then build a new canvas, drawing list etc from scratch for next control selected.
Charles
I think the full set of TBGL functions must be changed because (if I'm not wrong) programmer should have to pass the handle of the window where to draw.
Currently there is only one active handle so TBGL functions know where to draw next TBGL command but in case of multiple handle every TBGL function should have an additional param.
Just guessing, maybe I'm wrong.
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Nope, you could have a TBGL_SetDrawTarget command. That is what I did way back with IBasic Pro and it's 2D pak. It was only able to use one window, but not anymore after I was done with it.
That is great.
But I was thinking about (for example) two or more MDI windows acting as TBGL canvas. Each window will fire multiple redrawing events simultaneously. How can you manage such a situation? Maybe with a semaphore variable that will fire green light when the first drawing loop has finished or things like that.
There is an example in \thinBasic\SampleScripts\UI\MDI\ called "MDI_Test_DialogEdit_And_TBGL.tbasic" that shows it. Maybe it can be amended to show how to use multiple TBGL canvas windows.
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Yes I saw that example. It supports a separate image for each new child dialog created.
Incidently, you may need to take a closer look at these MDI examples, when you have some time to spare. They don't seem to work as expected - possibly something broken with more recent thinBasic development. - controls on child dialogs not working.
Charles
Bookmarks