Results 1 to 5 of 5

Thread: OpenB3D Engine Wrapper for ThinBasic (open testing)

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Location
    Russia, Murmansk
    Posts
    3
    Rep Power
    0

    OpenB3D Engine Wrapper for ThinBasic (open testing)

    Hello everybody!

    Here is my wrapper of OpenB3D for thinBasic. OpenB3D is based on MiniB3D and use OpenGL for graphics rendering.

    Some Features:
    • Repeats almost all features Blitz3D;
    • Allows you to load *.b3d files (with animations) and *.3ds (only static) 3D model formats;
    • Allows you to load *.bmp, *.jpg, *.png, *.tga texture formats;

    How to use:
    • Extract openb3d.dll and openb3d.tbasici in your project folder;
    • In your main source place the line #INCLUDE "%APP_SOURCEPATH%\openb3d.tbasici";


    Sample using TBGL + Openb3D:
    Uses "TBGL"
    #INCLUDE "%APP_SOURCEPATH%\openb3d.tbasici"
    
    %NO_PARENT = 0 As Byte
    
    Function TBMain()
      Local hWnd As DWord
      
      Local CAM, LIGHT, MESH As DWord
      
      ' -- Create and show window
      hWnd = TBGL_CreateWindowEx("OpenB3D 0.6 - press ESC to quit", 1280, 720, 32, %TBGL_WS_WINDOWED Or %TBGL_WS_CLOSEBOX) 
      Graphics3D(1280, 720, 32, 2, 60)
      
      CAM = CreateCamera(%NO_PARENT)
      LIGHT = CreateLight(1, %NO_PARENT)
      MESH = CreateCube(%NO_PARENT)
      
      PositionEntity(CAM, 0.0, 0.0, -25.0, %FALSE)
      PositionEntity(LIGHT, 0.0, 5.0, 0.0, %FALSE)   
      
      ' -- Resets status of all keys 
      TBGL_ResetKeyState() 
    
      ' -- Main loop
      While TBGL_IsWindow(hWnd) 
    
        TBGL_ClearFrame
        
        TurnEntity(MESH, 0.3, 0.1, 0.15, %FALSE)
        
        RenderWorld()
        
        TBGL_DrawFrame 
    
        ' -- ESCAPE key to exit application
        If TBGL_GetWindowKeyState(hWnd, %VK_ESCAPE) Then Exit While 
    
      Wend 
      
      ' -- Clear OpenB3D res
      ClearWorld(%TRUE, %TRUE, %TRUE)
      TBGL_DestroyWindow
    End Function
    
    thinBasic-OpenB3D.zip

    Here is Keywords list for syntax highlighting in thinAir IDE.

    For syntax highlighting replace thinBasic_Keywords_Usr.ini in C:\thinBasic\thinAir\Syntax\thinBasic path with attached thinBasic_Keywords_Usr.ini.

    OpenB3D_thinBasic_Keywords_Usr.zip
    Last edited by Artemka; 12-03-2013 at 23:30.

  2. #2
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,525
    Rep Power
    170
    Great! Thanx for the nice present. Something new to play with

    You don't have by any chance some link to any documentation of the OpenB3D-Library?

    It would fit here.
    I think there are missing some Forum-sections as beta-testing and support

  3. #3
    Junior Member
    Join Date
    Mar 2013
    Location
    Russia, Murmansk
    Posts
    3
    Rep Power
    0
    Quote Originally Posted by ReneMiner View Post
    Great! Thanx for the nice present. Something new to play with

    You don't have by any chance some link to any documentation of the OpenB3D-Library?

    It would fit here.
    You should use Blitz3D docs. OpenB3D fully suport all 3d features of blitz3D, but no 2d. In future i try to port some examples from blitz to openb3d.

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

    wow ... what an entrance in thinBasic community forum!
    Thanks a lot for this porting and for letting us know.

    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

  5. #5
    Junior Member
    Join Date
    Mar 2013
    Location
    Russia, Murmansk
    Posts
    3
    Rep Power
    0
    Quote Originally Posted by ErosOlmi View Post
    Dear Artemka,

    wow ... what an entrance in thinBasic community forum!
    Thanks a lot for this porting and for letting us know.

    Ciao
    Eros
    Glad to try to help out. Although there are still some difficulties in sharing TBGL Sprites with OpenB3D.

Similar Threads

  1. MCI Video Wrapper
    By Petr Schreiber in forum Experimental modules or library interface
    Replies: 20
    Last Post: 17-07-2020, 20:55
  2. TBGL+3d-Engine
    By ReneMiner in forum TBGL General
    Replies: 3
    Last Post: 20-02-2013, 21:40
  3. Another open source wrapper for FreeBASIC
    By maxim in forum Irrlicht
    Replies: 3
    Last Post: 24-06-2011, 08:03
  4. ODE - Open Dynamics Engine
    By Petr Schreiber in forum ODE - Open Dynamics Engine
    Replies: 21
    Last Post: 28-04-2007, 08:29

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
  •