Functions for creating and controlling engine native extension libraries.
Result enumeration.
dmExtension::RESULT_OK -
dmExtension::RESULT_INIT_ERROR -
Extension application entry callback data. This is the data structure passed as parameter by extension Application entry callbacks (AppInit and AppFinalize) functions
m_ConfigFile -
m_WebServer - Only valid in debug builds, where the engine service is running. 0 otherwise.
Extension callback data. This is the data structure passed as parameter by extension callbacks (Init, Finalize, Update, OnEvent)
m_ConfigFile - the config file
m_ResourceFactory - the resource factory
m_L - the lua state
Event id enumeration. EVENT_ID_ICONIFYAPP and EVENT_ID_DEICONIFYAPP only available on
dmExtension::EVENT_ID_ACTIVATEAPP -
dmExtension::EVENT_ID_DEACTIVATEAPP -
dmExtension::EVENT_ID_ICONIFYAPP -
dmExtension::EVENT_ID_DEICONIFYAPP -
Extra callback enumeration for RegisterCallback function.
dmExtension::CALLBACK_PRE_RENDER -
dmExtension::CALLBACK_POST_RENDER -
Extension event callback data. This is the data structure passed as parameter by extension event callbacks (OnEvent)
m_Event -
Callback typedef for functions passed to RegisterCallback().
params -
-
Register extra extension callbacks.
callback_type - Callback type enum
func - Function to register as callback
- Returns true if successfully registered the function, false otherwise.
Declare and register new extension to the engine. This macro is used to declare the extension callback functions used by the engine to communicate with the extension.
symbol - external extension symbol description (no quotes).
name - extension name. Human readable.
appinit - app-init function. May be null.
app_params
AppParams
structure.appfinal - app-final function. May be null.
app_params
AppParams
structure.init - init function. May not be null.
params
Params
structureupdate - update function. May be null.
params
Params
structureon_event - event callback function. May be null.
params
Params
structureevent
Event
structurefinal - function. May not be null.
params
Params
structure.Register a new extension:
DM_DECLARE_EXTENSION(MyExt, "MyExt", AppInitializeMyExt, AppFinalizeMyExt, InitializeMyExt, UpdateMyExt, OnEventMyExt, FinalizeMyExt);
Register an iOS application delegate to the engine. Multiple delegates are supported (Max 32)
delegate - An UIApplicationDelegate, see: https://developer.apple.com/documentation/uikit/uiapplicationdelegate?language=objc
```objective-c
// myextension_ios.mm
id
Deregister a previously registered iOS application delegate This function is only available on iOS.
delegate - an id
Set if the platform is iPhoneOS
Set if the platform is Android
Set if the platform is Html5
Set if the platform is OSX
Set if the platform is Linux
Set if the platform is Windows (on both x86 and x86_64)