Wrapper Question

Blitz3D Forums/Blitz3D Beginners Area/Wrapper Question

Sir Gak(Posted 2006) [#1]
Um, in reading posts, I always see references to a "wrapper", of this kind or that. Dumb question: what's a wrapper (outside of a plastic used to cover a candy bar)?


Pete Carter(Posted 2006) [#2]
ill try and get this right, a wrapper is something that can control things like ODE or graphics engines etc making them useable with blitz. an example of this is ode wrapper for blitz3d which add some new commands to blitzs 3d to let you add physics to your game. some wrappers are complete and let you control everything some have limits but its a great idea.

Pete


Sir Gak(Posted 2006) [#3]
Thanks.

Next dumb question: how do wrappers work? Do we use the B3D "Include" command and then call the wrapper's ability(ies) via Functions (with appropriate parameters, if any)?


jfk EO-11110(Posted 2006) [#4]
wrappers are usually needed for dll's (like the mentioned physics library ODE). Blitz can only do some limited calls to functions of an external DLL. The wrapper may be a dll too, allowing blitz to access all functions in the physics dll nonetheless. so it's a dll that allows to use an other dll (that could not be used directly).

wrapper dll's have to declare the functions that should be executable from within blitz in a userlib file. these files are stored in the folder "userlibs" and have a ".decls" extension. There may also be decls files that allow to use Windows Api Functions from within Blitz.

See code achives for more info on userlibs.