HGamer3D-Ogre-Binding-0.1.8: Library to enable 3D game development for Haskell - Ogre Bindings

Safe HaskellSafe-Infered

HGamer3D.Bindings.Ogre.ClassResource

Synopsis

Documentation

deleteSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance which is going to be deleted.

-> IO () 

Virtual destructor. Shouldn't need to be overloaded, as the resource deallocation code should reside in unload()Resource::unload()

prepareSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

backgroundThread - Whether this is occurring in a background thread

-> IO () 

Loads the resource, if it is not already. If the resource is loaded from a file, loading is automatic. If not, if for example this resource gained it's data from procedural calls rather than loading from a file, then this resource will not reload on it's own.

Prepares the resource for load, if it is not already. One can call prepare()load()load()prepare()load()prepare()prepare()prepare()load()prepare()load()prepare()prepare()

loadSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

backgroundThread - Indicates whether the caller of this method is the background resource loading thread.

-> IO () 

Reloads the resource, if it is already loaded. Calls unload()load()

reloadSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Returns true if the Resource

isReloadableSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

isManuallyLoadedSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Is this resource manually loaded?

unloadSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Retrieves info about the size of the resource.

Unloads the resource; this is not permanent, the resource can be reloaded later if required.

getSizeSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Int 

touchSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Gets resource name.

Touches the resource to indicate it has been used.

getNameSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO String 

isPreparedSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Returns true if the Resource

isLoadedSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Returns true if the Resource

isLoadingSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Returns whether the resource is currently in the process of background loading.

isBackgroundLoadedSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Returns whether this ResourceThis option only makes sense when you have built Ogreload()load()isLoaded()

setBackgroundLoadedSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

bl

-> IO () 

Escalates the loading of a background loaded resource. If a resource is set to load in the background, but something needs it before it's been loaded, there could be a problem. If the user of this resource really can't wait, they can escalate the loading which basically pulls the loading into the current thread immediately. If the resource is already being loaded but just hasn't quite finished then this method will simply wait until the background load is complete.

Tells the resource whether it is background loaded or not. Resource::isBackgroundLoaded

escalateLoadingSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Gets the group which this resource is a member of.

getGroupSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO String 

changeGroupOwnershipSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

newGroup - Name of the new group

-> IO () 

Gets the manager which created this resource.

Change the resource group ownership of a ResourceThis method is generally reserved for internal use, although if you really know what you're doing you can use it to move this resource from one group to another.

getCreatorSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO HG3DClass 

getOriginSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO String 

Get the origin of this resource, e.g. a script file name. This property will only contain something if the creator of this resource chose to populate it. Script loaders are advised to populate it.

getStateCountSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Int 

Returns the number of times this resource has changed state, which generally means the number of times it has been loaded. Objects that build derived data based on the resource can check this value against a copy they kept last time they built this derived data, in order to know whether it needs rebuilding. This is a nice way of monitoring changes without having a tightly-bound callback.