Author Topic: OpenB3D - Blitz3D for GLBasic  (Read 13997 times)

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
OpenB3D - Blitz3D for GLBasic
« on: 2011-Sep-30 »
Hi,

This is my wrapper for OpenBlitz 3D.

See "Air.app.rar" for .exe demo.
See "OpenB3D.rar" for lib source.

Have fun!


Ian


Quote
Readme for the GLBasic wrapper OB3D

This version is an alpha.

To install the extra compiler stuff that the lib requires...
1) Since this messes with your compiler dir, back it up (I just zipped the Compiler dir)

2) Download http://www.glbasic.com/files/headers.rar and decompress the compressed 'compiler' folder into your GLB compiler folder, overwrite any files of prompted.

3) Decompress the "platform.rar" folder, from the attached archive, into your GLB 'compiler/platform' folder, overwrite if prompted.


To configure your OB3D project settings...

1) Open your project options

2) Set "cmp" command line option to "-I"<my project folder>\OpenB3d 0.35_src\src" -O3" (Without start and end quotes)

3) Set "lnk" command line option to "-llibglu32 -lGLee" (Without start and end quotes)

4) Make sure your Graphics res/Hz match your OB3D "Graphics" command parameters.


Note: Make sure your project has OpenB3DLib.gbas in it for the OB3D command imports.

That's basically it!


There is a demo ("air") project, just remember to change the "cmp" option to match your own path to the "OpenB3d 0.35_src" dir. Best way to see how this works is to get this project working then examine the options.


OK, OpenB3D ( http://sourceforge.net/projects/minib3d/ ) is an open-source Obj C -> C++ conversion of miniB3D/iMiniB3D by angros47 over here( http://www.freebasic.net/forum/viewtopic.php?t=15409&start=0 I'm Veggie there BTW!) on the FreeBasic forum.
Its basically Blitz3D for OpenGL, so you can load .B3D, .3DS files directly. It so closely matches Blitz3D, you can use the manual for Blitz3D! It has full internal quaternion support, so no gimbal lock, an entity system, ROAM landscape object, an internal boned animation structure, really nice sliding collision support (Coldet Lib I believe) and other bit-n-bobs.

I converted it for my own use, and that is, I intend to get it running on iOS/Android again as most of the lib is VBO/OpenGLES backward compatible. Its a single pass lib, so in many ways the GLbasics internal 3D lib is better for your needs if your require two pass features (shadows for example). It 'should' work on Linux off the bat, I can't test it. It has no external dependencies to speak of. The Glee/Glu extension support is only needed for the windows version. In theory getting it to run on OSX should be a breeze too.

GLB 2D works fine, 3D seems to have a problem with frustum clipping (neg Z is fine, positive "Z" is clipped), still looking into getting them to play together though.

All the C files were altered using the GLB editor, which I have discovered works as a rather fine C++ source editor. That is the point of not using static libs yet is to allow the source to be on hand and modifiable right within the GLB IDE, compilation is a breeze(remember to double click the Debug icon though, to wake up incredibuild! :P) as its part of the project. So this is a dev version of the finished project. I am not a C programmer so any tips in this area will be very appreciated. I am only responsible for the wrapper and all lib source questions should be directed towards Angros(he's a very approachable guy BTW!). If you can, contribute to this worthy project with source fixes/updates, then please do.

Couple of bugs to squish yet, its an alpha remember, oh and your media needs to be in the same dir as the app .exe for now too.

Thanks go to...

Si Armstrong, angros47, Gernot, Schranz0r.


Ian Thompson(aka Bigsofty/Veggie)


P.S. If Gernot fulfils my request for default IMPORT param values, this lib can be simplified a lot further. Also an option to turn off incredibuild for editing C source, would be great too. ;)

[attachment deleted by admin]
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #1 on: 2011-Sep-30 »
List of commands in lib...

Click on command for more info.

AddAnimSeq
AddMesh
AddTriangle
AddVertex
AmbientLight
AntiAlias
Animate
Animating
AnimLength
AnimSeq
AnimTime
BrushAlpha
BrushBlend
BrushColor
BrushFX
BrushShininess
BrushTexture
CameraClsColor
CameraClsMode
CameraFogColor
CameraFogMode
CameraFogRange
CameraPick
CameraProject
CameraProjMode
CameraRange
CameraViewport
CameraZoom
ClearCollisions
ClearSurface
ClearTextureFilters
ClearWorld
CollisionEntity
Collisions
CollisionNX
CollisionNY
CollisionNZ
CollisionSurface
CollisionTime
CollisionTriangle
CollisionX
CollisionY
CollisionZ
CountChildren
CountCollisions
CopyEntity
CopyMesh
CountSurfaces
CountTriangles
CountVertices
CreateBrush
CreateCamera
CreateCone
CreateCylinder
CreateCube
CreateMesh
CreateLight
CreatePivot
CreateSphere
CreateSprite
CreateSurface
CreateTexture
DeltaPitch
DeltaYaw
EntityAlpha
EntityAutoFade
EntityBlend
EntityBox
EntityClass
EntityCollided
EntityColor
EntityDistance
EntityFX
EntityInView
EntityName
EntityOrder
EntityParent
EntityPick
EntityPickMode
EntityPitch
EntityRadius
EntityRoll
EntityShininess
EntityTexture
EntityType
EntityVisible
EntityX
EntityY
EntityYaw
EntityZ
ExtractAnimSeq
FindChild
FindSurface
FitMesh
FlipMesh
FreeBrush
FreeEntity
FreeTexture
GetBrushTexture
GetChild
GetEntityBrush
GetEntityType
ResetEntity
GetParent
GetSurface
GetSurfaceBrush
Graphics3D
HandleSprite
HideEntity
LightColor
LightConeAngles
LightRange
LinePick
LoadAnimMesh
LoadAnimTexture
LoadBrush
LoadMesh
LoadTexture
LoadSprite
MeshDepth
MeshesIntersect
MeshHeight
MeshWidth
MoveEntity
NameEntity
PaintEntity
PaintMesh
PaintSurface
PickedEntity
PickedNX
PickedNY
PickedNZ
PickedSurface
PickedTime
PickedTriangle
PickedX
PickedY
PickedZ
PointEntity
PositionEntity
PositionMesh
PositionTexture
ProjectedX
ProjectedY
ProjectedZ
RenderWorld
ResetEntity
RotateEntity
RotateMesh
RotateSprite
RotateTexture
ScaleEntity
ScaleMesh
ScaleSprite
ScaleTexture
SetAnimTime
SetCubeFace
SetCubeMode
ShowEntity
SpriteViewMode
TerrainHeight
TerrainX
TerrainY
TerrainZ
TextureBlend
TextureCoords
TextureHeight
TextureFilter
TextureName
TextureWidth
TFormedX
TFormedY
TFormedZ
TFormNormal
TFormPoint
TFormVector
TranslateEntity
TriangleVertex
TurnEntity
UpdateNormals
UpdateWorld
VectorPitch
VectorYaw
VertexAlpha
VertexBlue
VertexColor
VertexCoords
VertexGreen
VertexNormal
VertexNX
VertexNY
VertexNZ
VertexRed
VertexTexCoords
VertexU
VertexV
VertexW
VertexX
VertexY
VertexZ
Wireframe

Wouldn't fit in one post!  :S
« Last Edit: 2011-Oct-01 by bigsofty »
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5013
  • O Rly?
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #2 on: 2011-Sep-30 »
OPENB3D ????

WTF?!
I <3 DGArray's :D

PC:
AMD RYzen 7 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #3 on: 2011-Sep-30 »
Its really a conversion of iMiniB3D (see http://www.freebasic.net/forum/viewtopic.php?t=15409&start=0). Its not the full Blitz3D engine (BSPs for example are noticeably missing :() but 90% of it is in there and working.
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline ampos

  • Prof. Inline
  • *****
  • Posts: 1594
    • View Profile
    • AMpostata Website
Re: OpenB3D - Blitz3D for GLBasic
« Reply #4 on: 2011-Sep-30 »
Is this only for Win or any GLB target?
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Offline Marmor

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 908
  • 96A285CC
    • View Profile
    • my youtube channel
Re: OpenB3D - Blitz3D for GLBasic
« Reply #5 on: 2011-Sep-30 »
 :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :nw: :-* :D
you are a mad dog  :good:

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #6 on: 2011-Oct-01 »
Thanks Marmor, I think! :P

Ampos, it ready for Windows and Linux(untested), it 'should' work, with some very small modifications, almost anywhere as its pretty platform neutral code.
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5013
  • O Rly?
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #7 on: 2011-Oct-02 »
I like the mix between GLB and B3D !

Awesome work!
I <3 DGArray's :D

PC:
AMD RYzen 7 1700 @3.9Ghz, 16GB HyperX Fury 2666Mhz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #8 on: 2011-Oct-02 »
Thank you. Has one one tried a Linux build yet?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Marmor

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 908
  • 96A285CC
    • View Profile
    • my youtube channel
Re: OpenB3D - Blitz3D for GLBasic
« Reply #9 on: 2011-Oct-02 »
no linux here .
we need ios android and webos !
who can ....

Offline blackway

  • Mr. Polyvector
  • ***
  • Posts: 186
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #10 on: 2011-Oct-02 »
bigsofty, thank you very much for your work ! :good:
It's great!!!

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #11 on: 2011-Oct-03 »
Glad you like it Blackway!   :)
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3357
  • Integrated Brain
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #12 on: 2011-Oct-03 »
Big Softy, it´s really impresive. I take a look a another 3d engine, make for Blender, I think it´s called game Kit, it´s are in Google, and Use the Irricht or another engine(don´t remenber the name), it´s free and can use on iPhone, and now I look a developement about Android, the quality it´s very good.

I think this can be a good option, but well it´s a lot of work.

But the wrapper it´s awesoming, I hope this can use in mobile devices, if not, well for make PC games can be vey, vey usefulll, thanks Bigsofty.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2602
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #13 on: 2011-Oct-04 »
Your very welcome Mentalthink.

I hope to start to try and get it going on iPhone as soon a Trucidare and Gernot release the Win32 iOS compile feature(I have no dev account at the moment), Android will hopefully follow after.
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3357
  • Integrated Brain
    • View Profile
Re: OpenB3D - Blitz3D for GLBasic
« Reply #14 on: 2011-Oct-05 »
 :nw: :nw:

Ok Bigsofty, this can be absolutly awesome, I stay hallucinated the thing that made the Masters of GLbasic.
Simply impressible, and admirable yours knoledges. :nw: :nw: