Unigine::Plugin Class
Header: | #include <UniginePlugin.h> |
Plugin Class
Members
virtual void * get_data ( ) #
Returns the plugin data.Return value
Plugin data.virtual const char * get_name ( ) #
Returns the name of the plugin.Return value
Plugin name.int get_order ( ) #
Returns the execution order of the plugin. Each plugin has its execution order, which determines the sequence in which plugin’s functions (update / postUpdate / render / shutdown) will be executed. The only exception is the init function as it is called just after loading the plugin.Remember, when writing your own plugin, that requires interaction with other ones, specifying correct order value is required to avoid issues and ensure proper execution sequence. If in your case the order doesn't matter, set the default 0 value.
Return value
Plugin execution order.virtual int get_version ( ) # const
Returns the version of the plugin.Return value
Plugin version.virtual void destroy ( ) #
Plugin should contain this function if it directly uses any OpenGL or DirectX commands. It is used to reinitialize the graphics context. Engine calls this function when the video mode is changed or application is restarted (i.e. video_restart is called).virtual void flush ( ) #
Engine calls this function before updating each physics frame.virtual void gui ( ) #
Engine calls this function before gui each render frame.virtual int init ( ) #
Engine calls this function on plugin initialization.Return value
Returns 1 on success, or 0 if an error occurred.virtual int loadWorld ( const XmlPtr & xml ) #
Engine calls this function on world loading.Arguments
- const XmlPtr & xml - Xml smart pointer.
Return value
Returns 1 on success, or 0 if an error occurred.virtual void render ( ) #
Engine calls this function before rendering each render frame.virtual int restoreState ( const StreamPtr & stream ) #
Engine calls this function on world restoring.This function is deprecated and will be removed in the next release.
Arguments
- const StreamPtr & stream - Stream smart pointer.
Return value
Returns 1 on success, or 0 if an error occurred.virtual int saveState ( const StreamPtr & stream ) #
Engine calls this function on world saving.This function is deprecated and will be removed in the next release.
Arguments
- const StreamPtr & stream - Stream smart pointer.
Return value
Returns 1 on success, or 0 if an error occurred.virtual int saveWorld ( const XmlPtr & xml ) #
Engine calls this function on world saving.Arguments
- const XmlPtr & xml - Xml smart pointer.
Return value
Returns 1 on success, or 0 if an error occurred.virtual int shutdown ( ) #
Engine calls this function on plugin shutdown.Return value
Returns 1 on success, or 0 if an error occurred.virtual void swap ( ) #
Engine calls this function before swapping each render frame.virtual void update ( ) #
Engine calls this function before updating each render frame.void postUpdate ( ) #
Engine calls this function after updating each render frame.Last update:
2019-08-16
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)