Results 1 to 5 of 5

Thread: OpenB3D Engine Wrapper for ThinBasic (open testing)

Threaded View

Previous Post Previous Post   Next Post Next Post
  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.

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
  •