GLBasic forum

Codesnippets => Inline / 3rd party => Topic started by: aonyn on 2011-Jan-11

Title: [Release] Xors3d build643 Wrapper for GLBasic
Post by: aonyn on 2011-Jan-11
Hi All,

At long last, here is the wrapper for Xors3d which I have been working on.
I will be keeping it up to date (well as much as time permits)
Many functions remain untested, but I have used many as well, and all I have needed so far work well.

I am including the GLBasic wrapper source code (just include with your project), as well as some additional PureBasic source code (for a helper DLL which comunicates with the library in utf8 when strings are passed), as well as a compiled version of the helper DLL (for those who don't own PureBasic and can't compile it themselves.)

Please note that any function which returns a const char* (string) will be appended with $.
Otherwise, everything uses the exact command names from the Xors3d documentation.

If you encounter any bugs, please post here and let me know, I will do my best to get everything working perfectly.
Or if you solve a problem, please also post here and let me know what was solved and how.

I hope this is useful to some in the community.
It should be a nice companion for BigSofty's iXors3d library, allowing you to test code locally in windows, and then only making minor adjustments to convert to iXors.

Thanks to all who assisted me on the forum when I encountered problems writing this wrapper, and especially to BigSofty.

regards,
Dave

[attachment deleted by admin]
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: Schranz0r on 2011-Jan-11
I test this later
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: aonyn on 2011-Jan-11
Thanks Schranz0r  :)
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: bigsofty on 2011-Jan-11
A lot of works gone into this, congrats and thanks Dave!  :enc:

Cheers,


Ian
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: aonyn on 2011-Jan-11
Thanks Ian   :)

regards,
Dave
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: Hemlos on 2011-Jan-11
Incredible lib. Ive heard good things about it.
However, please excuse my ignorance, is this for  opengl?
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: aonyn on 2011-Jan-11
Hi Hemlos,

Xors3d is DirectX9.
iXors3d is OpenGLES

regards,
Dave
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: bigsofty on 2011-Jan-12
Yes, it also has very nice entity manipulation commands, all gimbal lock free, perfect for say an flightsim for example...  ;)
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: Leginus on 2011-Jan-12
Excellent work. Not something I will use in the next few weeks, but I was considering looking at some windows development this year, and I get the impression that Directx is slightly better supported on older gfx cards so this will be great.

Thanks for all your efforts
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: aonyn on 2011-Jan-13
Thanks Leginus,

I hope it is useful for you.

regards,
Dave
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: Hemlos on 2011-Jan-28
Quote from: aonyn on 2011-Jan-11
Hi Hemlos,

Xors3d is DirectX9.
iXors3d is OpenGLES

regards,
Dave

Oh i see, thanks for the clarification.


Quote from: bigsofty on 2011-Jan-12
Yes, it also has very nice entity manipulation commands, all gimbal lock free, perfect for say an flightsim for example...  ;)

Gimbal lock is a side effect of opengl's inability to properly roll an object in 3 dimensions due to the internal object angular math(euler?) math.
Truely the only way to eliminate gimbal lock is by using the quaternion math lib you shared.
In case anyone wonders, you use the quat lib to roll-pitch-yaw the camera to the proper angles, aiming at a stationary object, then grab the sprite and billboard it. ;)
Thats all the bean im spilling tonight :P


Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: WPShadow on 2011-Mar-03
Is there a chance for a short example, something like "hello world" with Xors3d?
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: aonyn on 2011-Mar-06
Hi WPShadow,

I already answered you in your PM as you know, but I noticed you asked here also.
So in case anyone else is waiting for this, yes I will add some examples, but I am currently busy with work, as well as finishing some personal projects, but as soon as I have some time, hopefully soon, I will add examples.  :)

Regards,
Dave
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: WPShadow on 2011-Mar-09
Great! Thx!  :good:  :booze:
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: WPShadow on 2011-Mar-16
Hi,

I had a little time, so I completed the first example!

It's the "Animated texture sample".

If there's enough time, I will "translate" the others. :-)

CU

W.

[attachment deleted by admin]
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: aonyn on 2011-Mar-16
Thank you WPShadow,

regards,
Dave
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: WPShadow on 2011-Mar-16
If it's ok for you, I will try to translate the rest of it...
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: aonyn on 2011-Mar-16
Hi WPShadow

That would be great if you did.
I don't mind doing it, but I have to do it when I have time, which is often scarce due to my work.

Thanks,
Dave
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: WPShadow on 2011-Apr-05
Hi,

I try to finish the second example. There's a small bug, so it's not possible to load more than 40 soldiers.

But there's an other problem. The command xEntityParent doesn't work.

It it is in the code, the whole program crashes!

CU

W.
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: WPShadow on 2011-Apr-05
PS.: here's the second Example

xors example 2.rar - 35.65MB (http://www.zshare.net/download/8866518275c6824c/)
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: aonyn on 2011-Apr-06
Hi WPShadow,

Thank you for the second example.

About the 40 soldier limit, I will check into that and see if I can figure out a cause.
I will probably test it in C++ and see if I have the same problem there, to determine if it is xors or my wrapper at fault.

About the xEntityParent, that is not a command I have personally used yet, but it sounds as though that is most likely something in my wrapper.
Thank you for the heads up, and I will have a look at it soon.

BTW, I also will provide an update soon, probably at the same time.
It will bring the wrapper to date with the current release of xors, and also, adds a new helper function, thanks to MrTAToad's book.
I learned from the book how to get the hwnd pointer for the GLBasic window, and draw xors in the main window, rather than how it now draws in a second window.
I am already using it and it works well, so it will be added in the coming update.

Regards,
Dave
Title: Re: [Release] Xors3d build643 Wrapper for GLBasic
Post by: WPShadow on 2011-Apr-06
Yeah! Sounds really great! :good:

I will go on with the work! If I found any bug or something, I will post it here, if it's ok for you!

About example 2 --> if you start example 2 with activated Debug, start the Example and add enouth soldiers, then you get an Error and a debug message for a DIM

Perhaps it could help!  =D