Functions


<<LIBRARY MANAGEMENT>>


XLONG MD3_Init (maxmd3,flags)

Initialise library.
    maxmd3 : max ammount of models used (there is no limitation to instances ammount)
    flags     : unused, reserved for future evolution
    
Return -1 if initialisation fails

VOID MD3_Exit ()

Uninitialise library

No return value

VOID MD3_SetOption (option,value)

setup callbacks, see 'Callbacks' chapter for more details.
    
no return value.

XLONG DECLARE FUNCTION MD3_Version ()

Get current version of the module.Don't forget to check if versions match if you are using the DLL code.

Returns version of the module, currently 1.

<<MODELS MANAGEMENT>>


XLONG MD3_Load (modelname$,loadshader)

Load a model

    modelname$ : name of the model to load.model will be searched in the "/models/" subdirectory.
    loadshader : If non zero, MD3_Load will try to load shaders referenced in the MD3 file.
                            
Returns -1 if fails, model handle if success.    

VOID MD3_Free (model)

Free a model

    model : model handle returned by MD3_Load()
    
No return value

<<INFO FUNCTIONS>>


VOID MD3_ModelList (retfunc)

Returns models list in retfunc callback.Prototype : RetFunc(STRING modelname,XLONG modelhandle)

    retfunc : address of the callback function
    
no return value


VOID MD3_SurfaceList (model,retfunc)

Return model surfaces in retfunc callback.Prototype : RetFunc(STRING surfacename,XLONG surfaceID)

    model : model handle
    refunc : address of the callback function

no return value

VOID MD3_RenderMethod (tMD3instance @instance,surface,flags)

The default rendering function for model.

    instance : instance to render
    surface  : surface of the instance to render
    flags         : rendering mode (flags are cumulatives):
                                        -$$MD3_DEF_TEXTURE :render model with texture coords
                                        -$$MD3_DEF_LIGHT     :render model with normal coords

See 'Rendering' in 'Callbacks' chapter for more details

no return value

<<INSTANCE>>


VOID MD3_INSTANCE_Create (model,tMD3instance @instance)

Create an instance for a given model

    model : model that will be affected to instance
    instance : instance that will receive model characteristics and its own interface
    
no return value