Blitzmax Wrapper for SoftPixel Engine

BlitzMax Forums/BlitzMax Programming/Blitzmax Wrapper for SoftPixel Engine

KronosUK(Posted 2010) [#1]
I converted the Blitz3d wrapper for SoftPixel engine to work with Blitzmax. All commands are prefaced with "s". Seems to work fine for all the examples I tested.

I won't be updating it but it might be useful for someone.

See the Softpixel topic in Blitz3d uselibs for more info.



Last edited 2011


KronosUK(Posted 2010) [#2]
Part two



Last edited 2011


KronosUK(Posted 2010) [#3]
Knowing my luck someone else has already done this :(


wmaass(Posted 2010) [#4]
Cool, will have to check this out. I like SPE.


Kryzon(Posted 2010) [#5]
I was going to do this, but then gave up when the trouble showed itself to be too big for the task (for me, of course - have no experience in wrapping).
I have no information on someone else doing it, so you might as well be the first one [to publish it].

Thanks for sharing.

Last edited 2010


Naughty Alien(Posted 2010) [#6]
..nice work..


xlsior(Posted 2010) [#7]
I've never heard of SoftPixel -- what does this library actually do?


Kryzon(Posted 2010) [#8]
http://softpixelengine.sourceforge.net/features.html

Last edited 2010


LukasBanana(Posted 2010) [#9]
Thanks for sharing also I cannot use it because I don't have BlitzMax.
Nice too see that other people help to extend the SPE :-)


Naughty Alien(Posted 2010) [#10]
..hi Lukas..u should get Bmax..it will be real cutsie with your system :)


LukasBanana(Posted 2010) [#11]
BMax is not for free. This is the reason why I don't have BMax. I only got B3D at birthday for a long time ago.
But maybe I can extend the WrapperGenerator for BMax next year.
PS: please describe what "cutsie" means?! I don't know this word and didn't found a translation either in dict.leo.org nor in google-translator o.O


Perturbatio(Posted 2010) [#12]
It's not an official word, but is derived from cute: http://dictionary.cambridge.org/dictionary/british/cute_1

Meant to add, this seems to be working for me. Well, I've got some text drawn at the mouse coordinates working. That's a start :)

Last edited 2010


Kryzon(Posted 2011) [#13]
KronosUK, what's the license on this module you made?

Just for the sake of officially stating.


KronosUK(Posted 2011) [#14]
Nothing apart from what was all ready stated in the license that came with the Blitz3d wrapper. Its a pretty "thin" wrapper and LukasBanana did most of the hard work already.

I did try to make it into a module but failed miserably ;)


Kryzon(Posted 2011) [#15]
Interesting. I know how to make a header for modules, so I'll do that below.

Here's the module, with empty "BBDOC:" markups to highlight the function names:



Kryzon(Posted 2011) [#16]
PART 2:


HOW TO INSTALL:
Create a folder in your BlitzMax\MOD\ directory named "softpixel.mod". Inside this folder create another one named "wrapper.mod" (lower cases obligatory).
Copy and paste the content from the two codeboxes above into the same blank BlitzMax document. Save this document as "wrapper.bmx" (lower case also obligatory) inside the recently created BlitzMax\Mod\softpixel.mod\wrapper.mod\ folder.
Make sure you have the SoftPixelEngineWrapper.DLL. You can find it inside the "SoftPixel Engine Wrapper" package at this address. You can place this DLL in your Windows\System32\ folder. If that doesn't work, copy it to your wrapper.mod\ folder or to the same folder your application's executable is located.

Go to MS-DOS and change directory to blitzMax\bin\. When you get there, type either:
bmk makemods softpixel
or
bmk makemods softpixel.wrapper
This will compile the module.

Next, type:
makedocs
So the syntax highlighting will work next time you open the BMax IDE.
After this, it's ready for use.


KronosUK(Posted 2011) [#17]
aha I had some uppercase in the folder names which was mucking things up.


LukasBanana(Posted 2011) [#18]
@KronosUK & Kryzon: I want to add you two on my homepage under "credits -> special thanks to"
http://softpixelengine.sourceforge.net/credits.html
Because you are helping to port the wrapper to new languages :-)
If you agree, let me know ;-)


KronosUK(Posted 2011) [#19]
@LukasBanana. Fine by me

@Kryzon

I fear something has gone wrong in your code as I get window exceptions on a couple of commands now (sMoveCameraFree and sRenderworld)

I cannot see what the problem is but I have reposted my code at top of thread with module and bbdoc info for most of the functions which seems to work ok.


Kryzon(Posted 2011) [#20]
@Lukas: Fine by me too, thanks. You can use my real name if you want to.

@KronosUK
Hmm, do you have a sample of code making this error, as plain as it can be?
Are you certain that you typed the "s" prefix in front of all commands?
Sometimes I ended up getting those errors when I used Softpixel and accidently forgot to add the "s" on the beginning of the functions' names (so BMax would use MiniB3D's command set along with Softpixel's, and that of course would turn into an error - I wouldn't notice because both were highlighted).

This mostly happened with the sFlip command, always forgot that one.