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
    Philippines
    Age
    48
    Posts
    1,218
    Blog Entries
    1
    Rep Power
    133
    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.
    [TABLE="class: tblf1 tblf-fullwidth tblf-alternate"]
    [TR]
    [TD][COLOR=#b22222][B][SIZE=1]The limit is[/SIZE][/B][/COLOR][/TD]
    [TD="class: isRelinked"] [COLOR=#0000cd][B][SIZE=1]Imagination[/SIZE][/B][/COLOR][/TD]
    [/TR]
    [/TABLE]

  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
    50
    Posts
    8,198
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  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. TBGL+3d-Engine
    By ReneMiner in forum TBGL General
    Replies: 3
    Last Post: 20-02-2013, 21:40
  2. Another open source wrapper for FreeBASIC
    By maxim in forum Irrlicht
    Replies: 3
    Last Post: 24-06-2011, 08:03
  3. MCI Video Wrapper
    By Petr Schreiber in forum Experimental modules or library interface
    Replies: 8
    Last Post: 09-11-2008, 00:39
  4. ODE - Open Dynamics Engine
    By Petr Schreiber in forum ODE - Open Dynamics Engine
    Replies: 21
    Last Post: 28-04-2007, 08:29

Posting Permissions

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