Eidolon
Public Member Functions | List of all members
RenderAdapter Class Reference

#include <RenderTypes.h>

Inheritance diagram for RenderAdapter:
Inheritance graph
Collaboration diagram for RenderAdapter:
Collaboration graph

Public Member Functions

virtual ~RenderAdapter ()
 
virtual u64 createWindow (int width, int height) throw (RenderException)
 
virtual void paint ()
 
virtual void resize (int x, int y, int width, int height)
 
virtual RenderScenegetRenderScene ()
 

Detailed Description

This class represents the bridge between the rendering engine and the windowing toolkit. It is instantiated for the windowing object that will be the target for rendering. It's main purpose is to collect into one place the code for creating and resizing the render window and processing paint events. This also allows the windowing class to be defined without using headers for the rendering engine.

A RenderAdapter type is instantiated through getRenderAdapter() which is implemented by the specific renderer being used, thus it returns a specialized subtype specific to that renderer. The Config object passed as the argument is retained and used as the source of parameter info needed to instantiate the renderer. Once the object is created, createWindow() must be called after the host UI widget has been created so that the parameters identifying the window have been set in the Config object. These parameters are necessary since the renderer has to bind to a place to render into. Once this has been done and the widget is visible, only then can getRenderScene() be called to create the RenderScene object needed to interact with the renderer. Whenever the widget resizes resize() must be called with the new size as arguments. When the widget receives a paint event, paint() is called to cause a redraw of the scene by the renderer.

The function getRenderAdapter() and all the methods of this type are not thread-safe and should only be called by the windowing system's message pump (ie. main) thread.

The parameters to pass to the Config object are specific to the platform and renderer being used, but must be stored in the RenderParamGroup config group. For Ogre these are the following named values:

Windows: parent window ID number in "parentWindowHandle" Linux: D:S:W in "parentWindowHandle" where D is the display number, S the screen number, and W the window ID number OSX: window ID number in "externalWindowHandle"

Constructor & Destructor Documentation

◆ ~RenderAdapter()

virtual ~RenderAdapter ( )
inlinevirtual

Member Function Documentation

◆ createWindow()

virtual u64 createWindow ( int  width,
int  height 
)
throw (RenderException
)
inlinevirtual

Reimplemented in OgreRenderAdapter.

◆ getRenderScene()

virtual RenderScene* getRenderScene ( )
inlinevirtual

Reimplemented in OgreRenderAdapter.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ paint()

virtual void paint ( )
inlinevirtual

Reimplemented in OgreRenderAdapter.

◆ resize()

virtual void resize ( int  x,
int  y,
int  width,
int  height 
)
inlinevirtual

Reimplemented in OgreRenderAdapter.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: