Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: UI + TBGL + Oxygen Project

  1. #1

    UI + TBGL + Oxygen Project

    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
    Attached Files Attached Files

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: UI + TBGL + Oxygen Project

    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

  3. #3
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: UI + TBGL + Oxygen Project

    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

  4. #4

    Re: UI + TBGL + Oxygen Project


    Hi Petr,

    Is it possible to run many canvases simultaneously within different labels?

    Charles

  5. #5
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: UI + TBGL + Oxygen Project

    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

  6. #6

    Re: UI + TBGL + Oxygen Project


    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

  7. #7
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: UI + TBGL + Oxygen Project

    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

  8. #8

    Re: UI + TBGL + Oxygen Project

    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.


  9. #9
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: UI + TBGL + Oxygen Project

    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

  10. #10

    Re: UI + TBGL + Oxygen Project


    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

Page 1 of 2 12 LastLast

Similar Threads

  1. UI + TBGL + Oxygen II
    By Charles Pegge in forum Programs
    Replies: 1
    Last Post: 18-03-2010, 14:55

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •