minib3d just procedural?BlitzMax Modules Forums/MiniB3D/minib3d just procedural?
| I've only covered b3d code to blitzmax and minib3d in the past so never tryed anything oo in it. I can seam to make it work the oo way is it not possible? |
| It supports oo, I write all my b3d code in oo manner so it's easier to port to iMiniB3D |
| The interface functions just call the methods which actually do something, so yes it is generally possible and I suppose it might even be a bit faster (if BlitzMax still doesn't do inlining?). It should not make any other difference to your code if you use it as intended though (obviously you can also get inventive and just call internals as you like, which might).|
There isn't really any OO going on in miniB3D anyway though; with the obvious exception of Copy and Free, I don't think there's really any polymorphism in serious use. It's a very procedural design.
| I just can't seem to use things like createsphere in the blitzmax way only in the b3d sphere = createsphere() kind of way. Ill post some code if its not clear what im on about. Its when im usinga create function in a type. It just errors. |
| What's the "BlitzMax way"?|
CreateSphere is just like the other functions: a wrapper for the (in this case, static) method. How are you importing miniB3D? Perhaps the problem is that the real method isn't visible?
| minib3d object-oriented coding:|
local mysphere:TMesh = TMesh.CreateSphere() ''since CreateSphere is a function (versus a method), you would call the main Type. ''b3d way PositionEntity(mysphere,1,0,5) ''bmax way mysphere.PositionEntity(1,0,5)
| Ahh! what an idiot thanks for the example. i was going about it all wrong. |
| There is a file called "functions.bmx" or so. There you can see which|
methods and Type functions are called by each B3D-like function.