3D engine Horde3D for FreeBASIC Jan 16, 2017

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
LonnieTC
Posts: 9
Joined: Aug 18, 2022 23:14

Re: 3D engine Horde3D for FreeBASIC Jan 16, 2017

Post by LonnieTC »

Hello,

While learning more about FreeBASIC now, I have just seen your posts regarding Horde3D interfacing which I think is very interesting.

I would like to give it a try and have downloaded the Horde3D code from the link that you provided and would like to see it run on my Windows 11 for which I now have installed FreeBASIC and the VisualFBEditor.

So then, my question is how to tell FreeBASIC to use the library with a simple example.

Any help would be greatly appreciated.
Thanks in advance
Xusinboy Bekchanov
Posts: 782
Joined: Jul 26, 2018 18:28

Re: 3D engine Horde3D for FreeBASIC Jan 16, 2017

Post by Xusinboy Bekchanov »

LonnieTC wrote: Aug 20, 2022 11:26 Hello,

While learning more about FreeBASIC now, I have just seen your posts regarding Horde3D interfacing which I think is very interesting.

I would like to give it a try and have downloaded the Horde3D code from the link that you provided and would like to see it run on my Windows 11 for which I now have installed FreeBASIC and the VisualFBEditor.

So then, my question is how to tell FreeBASIC to use the library with a simple example.

Any help would be greatly appreciated.
Thanks in advance
For example, look at the sqlite3.bi file:

Code: Select all

#inclib "sqlite3"

#include once "crt/long.bi"
#include once "crt/stdarg.bi"

Extern "C"

#define SQLITE3_H
#define SQLITE_VERSION "3.34.0"
Const SQLITE_VERSION_NUMBER = 3034000
#define SQLITE_SOURCE_ID "2020-12-01 16:14:00 a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b"
Extern __sqlite3_version Alias "sqlite3_version" As Const Byte
#define sqlite3_version (*CPtr(Const ZString Ptr, @__sqlite3_version))

Declare Function sqlite3_libversion() As Const ZString Ptr
Declare Function sqlite3_sourceid() As Const ZString Ptr
Declare Function sqlite3_libversion_number() As Long
Declare Function sqlite3_compileoption_used(ByVal zOptName As Const ZString Ptr) As Long
Declare Function sqlite3_compileoption_get(ByVal N As Long) As Const ZString Ptr
Declare Function sqlite3_threadsafe() As Long
...
#inclib is used to connect the library.
Typically, a library connection is contained in the library's header files.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: 3D engine Horde3D for FreeBASIC Jan 16, 2017

Post by D.J.Peters »

change to the extracted folder something like D:\Horde3D
compile for example: anmaition.bas and execute the result animation.exe !
For FreeBASIC I self use geany as IDE on Linux and Windows and load any *.bas file compile and run it that's all.

if you are an Windows only user maybe FBIDE is the right editor for you.

Joshy

here are file: "animation.bas" loaded with FBIDE and a pressing [F5]
Image
Last edited by D.J.Peters on Oct 12, 2022 17:51, edited 1 time in total.
LonnieTC
Posts: 9
Joined: Aug 18, 2022 23:14

Re: 3D engine Horde3D for FreeBASIC Jan 16, 2017

Post by LonnieTC »

Wow, that was easier than I expected since I thought maybe AI would have to add some CLI switches to link to the library, but that was not necessary.

I actually also use Linux and Windows (plus a few other OS's) a lot but the current project that I am gearing up for will be primarily Windows (Mingw64) and Linux. The idea is have the code as close as possible so that it is relatively easy to build Windows and Linux versions from the same code-base. In general this is one thing that I like about Golang programming as well since it does pretty good for cross-platform development.

For this Hord3D, I am finding out that I REALLY like what I have seen in FreeBASIC and since it compiles to pretty small footprint native code, then that is just AWESOME.

I was able to compile the *.bas files in the C:\Horde3D and they showed up nicely but did find that they did not have any keyboard/mouse controls mapped in so that you could move around and such.

Do you know of any examples that also have these controls mapped in since I will need to learn how this can be done easily to interface with the Hord3D library from FreeBASIC?

Also, I have been searching, but am wondering if Horde3D is the best available 3D game engine that is interfaced with FreeBASIC at the moment?

Later, once I get a better feel for things then maybe I can see about working up some FreeBASIC interfaces to other engines as well.
Thanks again
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: 3D engine Horde3D for FreeBASIC Jan 16, 2017

Post by D.J.Peters »

Horde 3D has a forum and a wiki page (see first post) but it's for advanced users !

Maybe MiniB3D is more what you looking for: viewtopic.php?t=15409

Joshy
Post Reply