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

Thread: TBGL-DisplayList-Tinker-Tool

  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,525
    Rep Power
    170

    TBGL-DisplayList-Tinker-Tool

    I proudly present: my first thinBasic-3d-program

    it's called "DisplayList-Tinker" and currently just of use to people which program TBGL-applications, so I serve the whole code uncompiled, plain and straight to be used and changed by tB-users needs - I got myself tB for free - the best basic-language I've ever had in all my life - so what's the deal? that's the least I can give back:

    What for:

    DLTinker allows to create meshes and helps to create displaylists visually instead of typing them in.
    You can create colored symbols, arrows and all that stuff that might be needed for a 3d-gui, just all the things you create display-lists for.

    Functions overview:

    Draws shapes:
    - triangles
    - parallelograms
    - boxes
    - tubes
    - discs (=cones)
    - rings

    Special tools:
    - mirrored drawing functions
    - pull vertices
    - grab vertices (very special, you have to try out!)

    Clipboard:
    - copy your mesh or parts of it to clipboard
    - insert clips rotated, rescaled = draw clips

    Load and Save:
    - to *.dList-file
    plain thinBasic-code that you can open with any text-editor to copy it instantly to your script
    Save:
    - to *.m15-format

    Undo-Redo:
    - of course!
    - almost unlimited (limit is the capacity of your hard-drive)

    At the time it's restricted to no use of textures.
    self-explaining, on-screen-console, help-on-board

    You do not need to click any menus or buttons! Just use the "buttons" of your keyboard and access all functions without searching for the right switch in some hidden submenu

    Additional shipped:
    - DisplayListLoader-Function to use displaylist-files due runtime.

    Have fun,
    suggestions welcome

    EDIT: New Version, 21.11.2012
    Attached Files Attached Files
    Last edited by ReneMiner; 21-11-2012 at 16:26.
    I think there are missing some Forum-sections as beta-testing and support

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Rene ... WOW
    I'm not an expert in 3D but wow.

    I played with LOAD command plus some CTRL and/or SHIFT movements arrow key or mouse. Great.
    Command system and onscreen help is very nice.
    All is moving and running fine.

    The only problem is that the main WHILE/WEND loop is very CPU intensive but this can be in some way reduced in future versions. Maybe Petr can help on this.

    Thanks a lot for this great present.
    An image is better than 1000 words
    Attached Images Attached Images
    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
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,525
    Rep Power
    170
    you see, the answers you all gave me to those countless questions had their reason and I made the best of it since I use thinBasic for three or four weeks now...
    There's still a few things that I want to build in, maybe some 3D-fonting-function, so you type letters into 3d-screen, or a clipboard would be handy, but the add-file function does at least a little bit of that
    Terrain-Builder would also be possible, but I think that needs textures...

    One question, how is that? I have a german-layouted keyboard, so I don't know if all keys work for everyone. but you can always exchange them yourself to meet your needs, would just be interesting to know...

    EDIT:
    FOUND BUGS!
    I have re-uploaded it (see first post), one is still in there but's just because I'm used to 0-based arrays. on program-end it does not delete the last undostage
    Last edited by ReneMiner; 07-11-2012 at 04:37.
    I think there are missing some Forum-sections as beta-testing and support

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

    congratulations on great program, really well done! I like how it leads the user, so everything is under control. And I like the fullscreen viewport approach, I used it previously in ThinEdge and ModelEd too - it gives the artist more space to look at.

    Regarding the CPU usage - you might consider using periodic function approach instead of While/Wend.

    How does it work? Instead of doing infinite loop, it launches the render function in discrete time intervals using internal timer.
    Little example on this is posted here.

    Another factor improving CPU footprint could be enabling V-sync, you can do it from TBGL like:
    TBGL_UseVsync(1)
    
    This makes sure the drawing is not done faster than refresh of the screen.


    Petr
    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

  5. #5
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,525
    Rep Power
    170
    thanks for your advice, I've already changed that and built the periodic call in but it's really too slow...

    Now I experience some strange behaviour:

    if I set the interval of the periodic call less than 20ms it crashes complaining some variable has already been defined.
    it does not if i set it to 20 ms! why is that? I wanted to set it on 16 so it goes together with 60Hz and VSync, 20 feels so wobbly. how can I prevent the crash if it doesnt finish the mainloop whithin in 20 ms? that might very well be if one has some hundred vertices on screen and uses a function like "sort all triangles".

    I' will add some rotation and starting a clipboard function today, i dreamed last night how to...
    Last edited by ReneMiner; 07-11-2012 at 15:05.
    I think there are missing some Forum-sections as beta-testing and support

  6. #6
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Thumbs down Kill kill kill

    Hello Rene,

    When you use the timer function I find its important to kill the timer on the way into the routine and create a new one on the way out. If you don't do this the timer routine would have multiple calls while the old routine is still running.

    This should fix it.
        Case %WM_TIMER
          If CBWPARAM = %IDC_TIMER Then
              Dialog Kill Timer CBHNDL, %IDC_TIMER
                Do_my_stuff_here()
              Dialog Set Timer CBHNDL, %IDC_TIMER, %TIMER_DELAY
          End If
    
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  7. #7
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,525
    Rep Power
    170
    it's not the regular timer-function that I used but a tbgl-specific one, i used this

     TBGL_BindPeriodicFunction( hWnd, "Main_Sub", 20 )
     
     TBGL_ProcessPeriodicFunction(hWnd)
    
    now i went back to some good old While-Wend and count sheep, is there a "tbgl-do-OS-Events" that I can call if running windowed?
    Last edited by ReneMiner; 07-11-2012 at 15:57.
    I think there are missing some Forum-sections as beta-testing and support

  8. #8
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159
    from the help

    To stop periodic execution from inside of called procedure, you should call TBGL_UnBindPeriodicFunction
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  9. #9
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,525
    Rep Power
    170
    thanks Michael, that works fine now. can go back to work now and add some new tools to the program
    I think there are missing some Forum-sections as beta-testing and support

  10. #10
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159
    No problem, its given me a new direction for my simple level scroller script I've been working on and will release for anyone to use V. soooooon.


    Mike C.
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

Page 1 of 2 12 LastLast

Similar Threads

  1. qt: idea for general tb user tool
    By Lionheart008 in forum Shout Box Area
    Replies: 21
    Last Post: 29-03-2010, 22:14
  2. RegExp tool
    By marcel in forum VBRegExp
    Replies: 1
    Last Post: 11-03-2008, 11:21
  3. cool landscape tool
    By kryton9 in forum 3rd party tools
    Replies: 17
    Last Post: 29-07-2007, 16:58
  4. [TOOL] TypeLib Browser
    By José Roca in forum Power Basic
    Replies: 2
    Last Post: 16-07-2007, 06:18
  5. Celtx, a tool to develop our storyline
    By Michael Hartlef in forum Game story and Character Development
    Replies: 4
    Last Post: 14-03-2007, 22:13

Members who have read this thread: 0

There are no members to list at the moment.

Tags for this Thread

Posting Permissions

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