ParCompMark::RendererPlugin Class Reference
#include <PCMRendererPlugin.h>
Inheritance diagram for ParCompMark::RendererPlugin:
Detailed Description
Custom renderer plugin.
Definition at line 68 of file PCMRendererPlugin.h.
Methods | |
virtual Renderer * | createRenderer (GLXRenderWindow::Pointer window, OpenGLRenderingEngine *parent) |
Create renderer object. | |
virtual void | destroyRenderer (Renderer *renderer) |
Destroy the specified renderer. | |
virtual void | resize (void *rendererHandle, const u32 &width, const u32 &height) |
Call the pcmOnResize event handler of the plugin. | |
virtual s32 | getSortOrder (void *rendererHandle) |
Call the pcmGetSortOrder function of the plugin. | |
virtual void | render (void *rendererHandle, const double &time, const unsigned &frame) |
Call the pcmOnRender event handler of the plugin. | |
virtual void | setMiscParam (void *rendererHandle, const char *&name, const char *&value) |
Call the pcmSetMiscParam function of the plugin. | |
virtual void | setObjectSpaceBoundingBox (void *rendererHandle, const double &x0, const double &y0, const double &z0, const double &x1, const double &y1, const double &z1) |
Call the pcmSetObjectSpaceBoundingBox function of the plugin. | |
virtual void | setObjectId (void *rendererHandle, const unsigned &objectId) |
Call the pcmSetObjectId function of the plugin. | |
virtual void | setScreenSpaceFramelet (void *rendererHandle, const double &u0, const double &v0, const double &u1, const double &v1) |
Call the pcmSetScreenSpaceFramelet function of the plugin. | |
virtual void | registerObjectSpaceBoundingBox (void *rendererHandle, const double &x0, const double &y0, const double &z0, const double &x1, const double &y1, const double &z1) |
Call the pcmRegisterObjectSpaceBoundingBox function of the plugin. | |
virtual void | _initializeSpecific () |
Specific initialization code. | |
virtual void | _finalizeSpecific () |
Specific finalization code. | |
virtual void | _setBufferGetter () |
Set buffer getter function to the plugin. | |
virtual void | _getNeededOpenGLExts () |
Get needed OpenGL externsions from the plugin. | |
virtual void | _initFastFunctions () |
Initialize mPcmOnResize and mPcmOnRender function pointers. | |
Public Types | |
typedef ParCompMark::Pointer< RendererPlugin, Mutex > | Pointer |
Type for pointer on this class. | |
typedef int(*) | pcmSetMiscParamType (void *, const char *, const char *) |
Function pointer type for. | |
typedef int(*) | pcmSetObjectSpaceBoundingBoxType (void *, double, double, double, double, double, double) |
Function pointer type for. | |
typedef int(*) | pcmregisterObjectSpaceBoundingBoxType (void *, double, double, double, double, double, double) |
Function pointer type for. | |
typedef int(*) | pcmSetObjectIdType (void *, unsigned) |
Function pointer type for. | |
typedef int(*) | pcmSetScreenSpaceFrameletType (void *, double, double, double, double) |
Function pointer type for. | |
typedef int(*) | pcmOnResizeType (void *, unsigned, unsigned) |
Function pointer type for. | |
typedef int(*) | pcmGetSortOrderType (void *) |
Function pointer type for. | |
typedef int(*) | pcmOnRenderType (void *, double, unsigned) |
Function pointer type for. | |
Public Member Functions | |
Constructors & destructor | |
RendererPlugin (const Plugin::PluginType &type, const std::string &name, const std::string &filename) | |
Create a renderer plugin. | |
virtual | ~RendererPlugin () |
The destructor. | |
Getters & setters | |
const std::list< std::string > & | getNeededOpenGLExts () const |
Getter of mNeededOpenGLExts. | |
Protected Types | |
typedef void(*) | bufferGetterType (const void *, const char *, void *) |
Function pointer type for the argument of. | |
typedef const char **(*) | pcmGetNeededOpenGLExtsType () |
Function pointer type for. | |
typedef void *(*) | pcmOnCreateRendererType (void *, Display *, Window, XVisualInfo *, GLXContext) |
Function pointer type for. | |
typedef int(*) | pcmOnDestroyRendererType (void *) |
Function pointer type for. | |
typedef int(*) | pcmSetBufferGetterType (bufferGetterType) |
Function pointer type for. | |
Static Protected Member Functions | |
Class methods | |
static void | _bufferGetter (const void *pRenderer, const char *bufferName, void *pBufferData) |
Protected Attributes | |
Variables | |
std::list< std::string > | mNeededOpenGLExts |
Needed OpenGL extensions. | |
RendererPlugin::pcmOnResizeType | mPcmOnResize |
Function pointer for. | |
RendererPlugin::pcmGetSortOrderType | mPcmGetSortOrder |
Function pointer for. | |
RendererPlugin::pcmOnRenderType | mPcmOnRender |
Function pointer for. | |
Classes | |
struct | PluginBuffer |
Buffer object of the plugin. More... |
Member Typedef Documentation
typedef void(*) ParCompMark::RendererPlugin::bufferGetterType(const void *, const char *, void *) [protected] |
typedef const char**(*) ParCompMark::RendererPlugin::pcmGetNeededOpenGLExtsType() [protected] |
typedef int(*) ParCompMark::RendererPlugin::pcmGetSortOrderType(void *) |
typedef void*(*) ParCompMark::RendererPlugin::pcmOnCreateRendererType(void *, Display *, Window, XVisualInfo *, GLXContext) [protected] |
typedef int(*) ParCompMark::RendererPlugin::pcmOnDestroyRendererType(void *) [protected] |
typedef int(*) ParCompMark::RendererPlugin::pcmOnRenderType(void *, double, unsigned) |
typedef int(*) ParCompMark::RendererPlugin::pcmOnResizeType(void *, unsigned, unsigned) |
typedef int(*) ParCompMark::RendererPlugin::pcmregisterObjectSpaceBoundingBoxType(void *, double, double, double, double, double, double) |
typedef int(*) ParCompMark::RendererPlugin::pcmSetBufferGetterType(bufferGetterType) [protected] |
typedef int(*) ParCompMark::RendererPlugin::pcmSetMiscParamType(void *, const char *, const char *) |
typedef int(*) ParCompMark::RendererPlugin::pcmSetObjectIdType(void *, unsigned) |
typedef int(*) ParCompMark::RendererPlugin::pcmSetObjectSpaceBoundingBoxType(void *, double, double, double, double, double, double) |
typedef int(*) ParCompMark::RendererPlugin::pcmSetScreenSpaceFrameletType(void *, double, double, double, double) |
Type for pointer on this class.
Reimplemented from ParCompMark::Plugin.
Definition at line 97 of file PCMRendererPlugin.h.
Constructor & Destructor Documentation
ParCompMark::RendererPlugin::RendererPlugin | ( | const Plugin::PluginType & | type, | |
const std::string & | name, | |||
const std::string & | filename | |||
) |
Create a renderer plugin.
- Parameters:
-
[in] type Type of the plugin. [in] name Name of the renderer plugin. [in] filename Plugin file name.
Definition at line 46 of file PCMRendererPlugin.cpp.
References _setBufferGetter(), mPcmGetSortOrder, mPcmOnRender, and mPcmOnResize.
Here is the call graph for this function:
ParCompMark::RendererPlugin::~RendererPlugin | ( | ) | [virtual] |
The destructor.
This class has virtual destructor.
Definition at line 68 of file PCMRendererPlugin.cpp.
Member Function Documentation
void ParCompMark::RendererPlugin::_bufferGetter | ( | const void * | pRenderer, | |
const char * | bufferName, | |||
void * | pBufferData | |||
) | [static, protected] |
- Buffer getter function with simple C style interface can be called by the plugin.
- If the
pBufferData
is not null, the specified buffer will be locked and its data will be retrieved. When thepBufferData
is null, the locked buffer will be unlocked.
- Parameters:
-
[in] pRenderer Pointer to the correspondent ParCompMark::Renderer object. [in] bufferName Name of the buffer to get. [in] pBufferData Pointer to the buffer description data.
Definition at line 78 of file PCMRendererPlugin.cpp.
References Assert, ParCompMark::RendererPlugin::PluginBuffer::colour, ParCompMark::Node::getBuffer(), ParCompMark::Process::getParent(), ParCompMark::OpenGLRenderingEngine::getParent(), ParCompMark::Renderer::getParent(), ParCompMark::RendererPlugin::PluginBuffer::height, ParCompMark::RendererPlugin::PluginBuffer::left, ParCompMark::RendererPlugin::PluginBuffer::top, and ParCompMark::RendererPlugin::PluginBuffer::width.
Referenced by _setBufferGetter().
Here is the call graph for this function:
void ParCompMark::RendererPlugin::_finalizeSpecific | ( | ) | [protected, virtual] |
Specific finalization code.
Implements ParCompMark::Plugin.
Definition at line 190 of file PCMRendererPlugin.cpp.
void ParCompMark::RendererPlugin::_getNeededOpenGLExts | ( | ) | [protected, virtual] |
Get needed OpenGL externsions from the plugin.
Definition at line 213 of file PCMRendererPlugin.cpp.
References ParCompMark::Logger::DEBUG, ParCompMark::DynLoad::getFunction(), ParCompMark::Singleton< T >::getInstance(), ParCompMark::DynLoad::hasFunction(), ParCompMark::Name::mName, and mNeededOpenGLExts.
Referenced by _initializeSpecific().
Here is the call graph for this function:
void ParCompMark::RendererPlugin::_initFastFunctions | ( | ) | [protected, virtual] |
Initialize mPcmOnResize and mPcmOnRender function pointers.
These function calls should be fast.
Definition at line 233 of file PCMRendererPlugin.cpp.
References Assert, ParCompMark::Logger::DEBUG, ParCompMark::DynLoad::getFunction(), ParCompMark::Singleton< T >::getInstance(), ParCompMark::DynLoad::hasFunction(), ParCompMark::Name::mName, mPcmGetSortOrder, mPcmOnRender, and mPcmOnResize.
Referenced by _initializeSpecific().
Here is the call graph for this function:
void ParCompMark::RendererPlugin::_initializeSpecific | ( | ) | [protected, virtual] |
Specific initialization code.
Implements ParCompMark::Plugin.
Definition at line 179 of file PCMRendererPlugin.cpp.
References _getNeededOpenGLExts(), _initFastFunctions(), ParCompMark::OpenGLExtensionLoader::load(), and mNeededOpenGLExts.
Here is the call graph for this function:
void ParCompMark::RendererPlugin::_setBufferGetter | ( | ) | [protected, virtual] |
Set buffer getter function to the plugin.
Definition at line 196 of file PCMRendererPlugin.cpp.
References _bufferGetter(), ParCompMark::Plugin::_checkError(), ParCompMark::Logger::DEBUG, ParCompMark::DynLoad::getFunction(), ParCompMark::Singleton< T >::getInstance(), ParCompMark::DynLoad::hasFunction(), ParCompMark::Plugin::mLastError, and ParCompMark::Name::mName.
Referenced by RendererPlugin().
Here is the call graph for this function:
Renderer * ParCompMark::RendererPlugin::createRenderer | ( | GLXRenderWindow::Pointer | window, | |
OpenGLRenderingEngine * | parent | |||
) | [virtual] |
Create renderer object.
Also call OpenGL intialization code for the plugin.
- Parameters:
-
[in] window The window on which the renderer will render. [in] parent Parent rendering engine of the renderer.
- Returns:
- Created renderer.
Definition at line 125 of file PCMRendererPlugin.cpp.
References Assert, ParCompMark::Logger::DEBUG, ParCompMark::DynLoad::getFunction(), ParCompMark::Singleton< T >::getInstance(), ParCompMark::DynLoad::hasFunction(), ParCompMark::Pointer< T, Lock >::lock(), ParCompMark::Name::mName, and ParCompMark::Pointer< T, Lock >::unlock().
Here is the call graph for this function:
void ParCompMark::RendererPlugin::destroyRenderer | ( | Renderer * | renderer | ) | [virtual] |
Destroy the specified renderer.
- Parameters:
-
[in] renderer Renderer to destroy.
Definition at line 161 of file PCMRendererPlugin.cpp.
References ParCompMark::Plugin::_checkError(), ParCompMark::Logger::DEBUG, ParCompMark::DynLoad::getFunction(), ParCompMark::Singleton< T >::getInstance(), ParCompMark::Renderer::getRendererHandle(), ParCompMark::DynLoad::hasFunction(), ParCompMark::Plugin::mLastError, and ParCompMark::Name::mName.
Here is the call graph for this function:
const std::list< std::string > & ParCompMark::RendererPlugin::getNeededOpenGLExts | ( | ) | const [inline] |
Getter of mNeededOpenGLExts.
Returns value of mNeededOpenGLExts.
- Returns:
- The value of mNeededOpenGLExts
Definition at line 415 of file PCMRendererPlugin.h.
s32 ParCompMark::RendererPlugin::getSortOrder | ( | void * | rendererHandle | ) | [inline, virtual] |
Call the pcmGetSortOrder
function of the plugin.
- Parameters:
-
[in] rendererHandle Pointer to the renderer instance in the plugin code.
- Returns:
- Sort order. -1 value indicates that the plugin has no sort order calculation routine or the sort order is unknown.
Definition at line 434 of file PCMRendererPlugin.h.
void ParCompMark::RendererPlugin::registerObjectSpaceBoundingBox | ( | void * | rendererHandle, | |
const double & | x0, | |||
const double & | y0, | |||
const double & | z0, | |||
const double & | x1, | |||
const double & | y1, | |||
const double & | z1 | |||
) | [inline, virtual] |
Call the pcmRegisterObjectSpaceBoundingBox
function of the plugin.
- Parameters:
-
[in] rendererHandle Pointer to the renderer instance in the plugin code. [in] x0 Lowest corner of the bounding box. [in] y0 Lowest corner of the bounding box. [in] z0 Lowest corner of the bounding box. [in] x1 Highest corner of the bounding box. [in] y1 Highest corner of the bounding box. [in] z1 Highest corner of the bounding box.
Definition at line 528 of file PCMRendererPlugin.h.
void ParCompMark::RendererPlugin::render | ( | void * | rendererHandle, | |
const double & | time, | |||
const unsigned & | frame | |||
) | [inline, virtual] |
Call the pcmOnRender
event handler of the plugin.
- Parameters:
-
[in] rendererHandle Pointer to the renderer instance in the plugin code. [in] time Time since start of the rendering. [in] frame Frame number.
Definition at line 442 of file PCMRendererPlugin.h.
void ParCompMark::RendererPlugin::resize | ( | void * | rendererHandle, | |
const u32 & | width, | |||
const u32 & | height | |||
) | [inline, virtual] |
Call the pcmOnResize
event handler of the plugin.
- Parameters:
-
[in] rendererHandle Pointer to the renderer instance in the plugin code. [in] width New width of the window on which the renderer renders. [in] height New height of the window on which the renderer renders.
Definition at line 426 of file PCMRendererPlugin.h.
void ParCompMark::RendererPlugin::setMiscParam | ( | void * | rendererHandle, | |
const char *& | name, | |||
const char *& | value | |||
) | [inline, virtual] |
Call the pcmSetMiscParam
function of the plugin.
- Parameters:
-
[in] rendererHandle Pointer to the renderer instance in the plugin code. [in] name Name of the parameter. [in] value Value of the parameter.
Definition at line 454 of file PCMRendererPlugin.h.
void ParCompMark::RendererPlugin::setObjectId | ( | void * | rendererHandle, | |
const unsigned & | objectId | |||
) | [inline, virtual] |
Call the pcmSetObjectId
function of the plugin.
- Parameters:
-
[in] rendererHandle Pointer to the renderer instance in the plugin code. [in] objectId Render object with the specified id.
Definition at line 493 of file PCMRendererPlugin.h.
void ParCompMark::RendererPlugin::setObjectSpaceBoundingBox | ( | void * | rendererHandle, | |
const double & | x0, | |||
const double & | y0, | |||
const double & | z0, | |||
const double & | x1, | |||
const double & | y1, | |||
const double & | z1 | |||
) | [inline, virtual] |
Call the pcmSetObjectSpaceBoundingBox
function of the plugin.
- Parameters:
-
[in] rendererHandle Pointer to the renderer instance in the plugin code. [in] x0 Lowest corner of the bounding box. [in] y0 Lowest corner of the bounding box. [in] z0 Lowest corner of the bounding box. [in] x1 Highest corner of the bounding box. [in] y1 Highest corner of the bounding box. [in] z1 Highest corner of the bounding box.
Definition at line 470 of file PCMRendererPlugin.h.
void ParCompMark::RendererPlugin::setScreenSpaceFramelet | ( | void * | rendererHandle, | |
const double & | u0, | |||
const double & | v0, | |||
const double & | u1, | |||
const double & | v1 | |||
) | [inline, virtual] |
Call the pcmSetScreenSpaceFramelet
function of the plugin.
- Parameters:
-
[in] rendererHandle Pointer to the renderer instance in the plugin code. [in] u0 Top-left corner of the framelet. [in] v0 Top-left corner of the framelet. [in] u1 Bottom-right corner of the framelet. [in] v1 Bottom-right corner of the framelet.
Definition at line 509 of file PCMRendererPlugin.h.
Member Data Documentation
std::list< std::string > ParCompMark::RendererPlugin::mNeededOpenGLExts [protected] |
Needed OpenGL extensions.
- Remarks:
- This is own attribute of this class.
Definition at line 154 of file PCMRendererPlugin.h.
Referenced by _getNeededOpenGLExts(), and _initializeSpecific().
Function pointer for.
- Remarks:
- This is own attribute of this class.
Definition at line 168 of file PCMRendererPlugin.h.
Referenced by _initFastFunctions(), and RendererPlugin().
Function pointer for.
- Remarks:
- This is own attribute of this class.
Definition at line 175 of file PCMRendererPlugin.h.
Referenced by _initFastFunctions(), and RendererPlugin().
Function pointer for.
- Remarks:
- This is own attribute of this class.
Definition at line 161 of file PCMRendererPlugin.h.
Referenced by _initFastFunctions(), and RendererPlugin().
The documentation for this class was generated from the following files: