#include <OgreRenderSystem.h>
Inheritance diagram for Ogre::RenderSystem:
Public Methods | |
RenderSystem () | |
Default Constructor. More... | |
virtual | ~RenderSystem () |
Destructor. More... | |
virtual const String & | getName (void) const=0 |
Returns the name of the rendering system. More... | |
virtual ConfigOptionMap & | getConfigOptions (void)=0 |
Returns the details of this API's configuration options. More... | |
virtual void | setConfigOption (const String &name, const String &value)=0 |
Sets an option for this API. More... | |
virtual String | validateConfigOptions (void)=0 |
Validates the options set for the rendering system, returning a message if there are problems. More... | |
virtual RenderWindow * | initialise (bool autoCreateWindow) |
Start up the renderer using the settings selected (Or the defaults if none have been selected). More... | |
virtual void | reinitialise (void)=0 |
Restart the renderer (normally following a change in settings). More... | |
virtual void | shutdown (void) |
Shutdown the renderer and cleanup resources. More... | |
virtual void | addFrameListener (FrameListener *newListener) |
Registers a FrameListener which will be called back every frame. More... | |
virtual void | removeFrameListener (FrameListener *oldListener) |
Removes a FrameListener from the list of listening classes. More... | |
virtual void | startRendering (void) |
Starts / restarts the automatic rendering cycle. More... | |
virtual void | setAmbientLight (float r, float g, float b)=0 |
Sets the colour & strength of the ambient (global directionless) light in the world. More... | |
virtual void | setShadingType (ShadeOptions so)=0 |
Sets the type of light shading required (default = Gouraud). More... | |
virtual void | setTextureFiltering (TextureFilterOptions fo)=0 |
Sets the type of texture filtering used when rendering. More... | |
virtual void | setLightingEnabled (bool enabled)=0 |
Sets whether or not dynamic lighting is enabled. More... | |
virtual RenderWindow * | createRenderWindow (const String &name, int width, int height, int colourDepth, bool fullScreen, int left=0, int top=0, bool depthBuffer=true, RenderWindow *parentWindowHandle=0)=0 |
Creates a new rendering window. More... | |
virtual RenderTexture * | createRenderTexture (const String &name, int width, int height)=0 |
Creates and registers a render texture object. More... | |
virtual void | attachRenderTarget (RenderTarget &target) |
Don't do this anymore, just allow via Root RenderSystem* regPtr = Root::getSingleton().getRenderSystem(); if (!regPtr || regPtr != this) Register self - library user has come to me direct Root::getSingleton().setRenderSystem(this);. More... | |
virtual RenderTarget * | getRenderTarget (const String &name) |
Returns a pointer to the render target with the passed name, or NULL if that render target cannot be found. More... | |
virtual RenderTarget * | detachRenderTarget (const String &name) |
Detaches the render target with the passed name from the render system and returns a pointer to it. More... | |
virtual String | getErrorDescription (long errorNumber)=0 |
Returns a description of an error code. More... | |
void | setWaitForVerticalBlank (bool enabled) |
Defines whether or now fullscreen render windows wait for the vertical blank before flipping buffers. More... | |
bool | getWaitForVerticalBlank (void) |
Returns true if the system is synchronising frames with the monitor vertical blank. More... | |
virtual void | _addLight (Light *lt)=0 |
Adds a light to the renderers list of active lights. More... | |
virtual void | _removeLight (Light *lt)=0 |
Removes a light from the renderers list. More... | |
virtual void | _modifyLight (Light *lt)=0 |
Modifies a light in the renderer. More... | |
virtual void | _removeAllLights (void)=0 |
Clears all the lights from the renderer. More... | |
virtual void | _pushRenderState (void)=0 |
Saves the current rendering state. More... | |
virtual void | _popRenderState (void)=0 |
Restores the render state to a previous state. More... | |
virtual void | _setWorldMatrix (const Matrix4 &m)=0 |
Sets the world transform matrix. More... | |
virtual void | _setWorldMatrices (const Matrix4 *m, unsigned short count) |
Sets multiple world matrices (vertex blending). More... | |
virtual void | _setViewMatrix (const Matrix4 &m)=0 |
Sets the view transform matrix. More... | |
virtual void | _setProjectionMatrix (const Matrix4 &m)=0 |
Sets the projection transform matrix. More... | |
virtual void | _setTextureUnitSettings (int texUnit, Material::TextureLayer &tl) |
Utility function for setting all the properties of a texture unit at once. More... | |
virtual void | _disableTextureUnit (int texUnit) |
Turns off a texture unit. More... | |
virtual void | _setSurfaceParams (const ColourValue &ambient, const ColourValue &diffuse, const ColourValue &specular, const ColourValue &emissive, Real shininess)=0 |
Sets the surface properties to be used for future rendering. More... | |
virtual void | _setTexture (int unit, bool enabled, const String &texname)=0 |
Sets the status of a single texture stage. More... | |
virtual unsigned short | _getNumTextureUnits (void)=0 |
Returns the number of texture units the current output hardware supports. More... | |
virtual void | _setTextureCoordSet (int unit, int index)=0 |
Sets the texture coordinate set to use for a texture unit. More... | |
virtual void | _setTextureCoordCalculation (int unit, TexCoordCalcMethod m)=0 |
Sets a method for automatically calculating texture coordinates for a stage. More... | |
virtual void | _setTextureBlendMode (int unit, const LayerBlendModeEx &bm)=0 |
Sets the texture blend modes from a TextureLayer record. More... | |
virtual void | _setTextureAddressingMode (int unit, Material::TextureLayer::TextureAddressingMode tam)=0 |
Sets the texture addressing mode for a texture unit. More... | |
virtual void | _setTextureMatrix (int unit, const Matrix4 &xform)=0 |
Sets the texture coordinate transformation matrix for a texture unit. More... | |
virtual void | _setSceneBlending (SceneBlendFactor sourceFactor, SceneBlendFactor destFactor)=0 |
Sets the global blending factors for combining subsequent renders with the existing frame contents. More... | |
virtual void | _setAlphaRejectSettings (CompareFunction func, unsigned char value)=0 |
Sets the global alpha rejection approach for future renders. More... | |
virtual void | _beginFrame (void)=0 |
Signifies the beginning of a frame, ie the start of rendering on a single viewport. More... | |
virtual void | _render (RenderOperation &op) |
Render something to the active viewport. More... | |
virtual void | _endFrame (void)=0 |
Ends rendering of a frame to the current viewport. More... | |
virtual void | _setViewport (Viewport *vp)=0 |
Sets the provided viewport as the active one for future rendering operations. More... | |
virtual Viewport * | _getViewport (void) |
Get the current active viewport for rendering. More... | |
virtual void | _setCullingMode (CullingMode mode)=0 |
Sets the culling mode for the render system based on the 'vertex winding'. More... | |
virtual CullingMode | _getCullingMode (void) |
virtual void | _setDepthBufferParams (bool depthTest=true, bool depthWrite=true, CompareFunction depthFunction=CMPF_LESS_EQUAL)=0 |
Sets the mode of operation for depth buffer tests from this point onwards. More... | |
virtual void | _setDepthBufferCheckEnabled (bool enabled=true)=0 |
Sets whether or not the depth buffer check is performed before a pixel write. More... | |
virtual void | _setDepthBufferWriteEnabled (bool enabled=true)=0 |
Sets whether or not the depth buffer is updated after a pixel write. More... | |
virtual void | _setDepthBufferFunction (CompareFunction func=CMPF_LESS_EQUAL)=0 |
Sets the comparison function for the depth buffer check. More... | |
virtual void | _setDepthBias (ushort bias)=0 |
Sets the depth bias, NB you should use the Material version of this. More... | |
virtual void | _setFog (FogMode mode=FOG_NONE, ColourValue colour=ColourValue::White, Real expDensity=1.0, Real linearStart=0.0, Real linearEnd=1.0)=0 |
Sets the fogging mode for future geometry. More... | |
virtual void | _beginGeometryCount (void) |
The RenderSystem will keep a count of tris rendered, this resets the count. More... | |
virtual unsigned int | _getFaceCount (void) |
Reports the number of tris rendered since the last _beginGeometryCount call. More... | |
virtual unsigned int | _getVertexCount (void) |
Reports the number of vertices passed to the renderer since the last _beginGeometryCount call. More... | |
virtual void | convertColourValue (const ColourValue &colour, unsigned long *pDest)=0 |
Generates a packed data version of the passed in ColourValue suitable for use as with this RenderSystem. More... | |
virtual bool | _isVertexBlendSupported (void) |
Returns whether or not this RenderSystem supports hardware vertex blending, ie multiple world matrices per vertex with blending weights. More... | |
virtual unsigned short | _getNumVertexBlendMatrices (void) |
Returns the number of matrices available to hardware vertex blending for this rendering system. More... | |
virtual void | _makeProjectionMatrix (Real fovy, Real aspect, Real nearPlane, Real farPlane, Matrix4 &dest)=0 |
Builds a perspective projection matrix suitable for this render system. More... | |
virtual void | _setRasterisationMode (SceneDetailLevel level)=0 |
Sets how to rasterise triangles, as points, wireframe or solid polys. More... | |
virtual void | setStencilCheckEnabled (bool enabled)=0 |
Turns stencil buffer checking on or off. More... | |
virtual bool | hasHardwareStencil (void)=0 |
Determines if this system supports hardware accelerated stencil buffer. More... | |
virtual ushort | getStencilBufferBitDepth (void)=0 |
Determines the bit depth of the hardware accelerated stencil buffer, if supported. More... | |
virtual void | setStencilBufferParams (CompareFunction func=CMPF_ALWAYS_PASS, ulong refValue=0, ulong mask=0xFFFFFFFF, StencilOperation stencilFailOp=SOP_KEEP, StencilOperation depthFailOp=SOP_KEEP, StencilOperation passOp=SOP_KEEP) |
This method allows you to set all the stencil buffer parameters in one call. More... | |
virtual void | setStencilBufferFunction (CompareFunction func)=0 |
Sets the stencil test function. More... | |
virtual void | setStencilBufferReferenceValue (ulong refValue)=0 |
Sets the stencil buffer reference value. More... | |
virtual void | setStencilBufferMask (ulong mask)=0 |
Sets the stencil buffer mask value. More... | |
virtual void | setStencilBufferFailOperation (StencilOperation op)=0 |
Sets the action to perform if the stencil test fails. More... | |
virtual void | setStencilBufferDepthFailOperation (StencilOperation op)=0 |
Sets the action to perform if the stencil test passes, but the depth buffer test fails. More... | |
virtual void | setStencilBufferPassOperation (StencilOperation op)=0 |
Sets the action to perform if both the stencil test and the depth buffer test passes. More... | |
void | softwareVertexBlend (RenderOperation &op, Matrix4 *pMatrices) |
Performs a software vertex blend on the passed in operation. More... | |
Protected Methods | |
bool | fireFrameStarted (FrameEvent &evt) |
Internal method for raising frame started events. More... | |
bool | fireFrameEnded (FrameEvent &evt) |
Internal method for raising frame ended events. More... | |
Protected Attributes | |
std::set< FrameListener * > | mFrameListeners |
Set of registered frame listeners. More... | |
ConfigOptionMap | mOptions |
RenderTargetMap | mRenderTargets |
The render targets. More... | |
RenderTargetPriorityMap | mPrioritisedRenderTargets |
The render targets, ordered by priority. More... | |
RenderTarget * | mActiveRenderTarget |
The Active render target. More... | |
TextureManager * | mTextureManager |
Viewport * | mActiveViewport |
CullingMode | mCullingMode |
bool | mVSync |
Material::TextureLayer | mTextureUnits [OGRE_MAX_TEXTURE_LAYERS] |
unsigned int | mFaceCount |
unsigned int | mVertexCount |
Matrix4 | mWorldMatrices [256] |
Saved set of world matrices. More... | |
std::vector< Real > | mTempVertexBlendBuffer |
Temporary buffer for vertex blending in software. More... | |
std::vector< Real > | mTempNormalBlendBuffer |
|
Default Constructor.
|
|
Destructor.
|
|
Adds a light to the renderers list of active lights. This method should not be called directly by user processes - this is adding a light at the rendering level. User processes should add lights using the SceneNode attachLight method Implemented in Ogre::D3DRenderSystem. |
|
Signifies the beginning of a frame, ie the start of rendering on a single viewport. Will occur several times per complete frame if multiple viewports exist. Implemented in Ogre::D3DRenderSystem. |
|
The RenderSystem will keep a count of tris rendered, this resets the count.
|
|
Turns off a texture unit.
|
|
Ends rendering of a frame to the current viewport.
Implemented in Ogre::D3DRenderSystem. |
|
|
|
Reports the number of tris rendered since the last _beginGeometryCount call.
|
|
Returns the number of texture units the current output hardware supports. For use in rendering, this determines how many texture units the are available for multitexturing (i.e. rendering multiple textures in a single pass). Where a Material has multiple texture layers, it will try to use multitexturing where available, and where it is not available, will perform multipass rendering to achieve the same effect. Implemented in Ogre::D3DRenderSystem. |
|
Returns the number of matrices available to hardware vertex blending for this rendering system.
|
|
Reports the number of vertices passed to the renderer since the last _beginGeometryCount call.
|
|
Get the current active viewport for rendering.
|
|
Returns whether or not this RenderSystem supports hardware vertex blending, ie multiple world matrices per vertex with blending weights.
|
|
Builds a perspective projection matrix suitable for this render system.
Implemented in Ogre::D3DRenderSystem. |
|
Modifies a light in the renderer. Modifies a light which has already been added using _addLight. Implemented in Ogre::D3DRenderSystem. |
|
Restores the render state to a previous state.
Implemented in Ogre::D3DRenderSystem. |
|
Saves the current rendering state. Stores the current rendering state on the render state stack. The state may then be altered and restored back to it's previous state using RenderSystem::_popRenderState. Used internally by Ogre to manage changes like model/view matrices, active materials/textures without having to repecify them every time. Implemented in Ogre::D3DRenderSystem. |
|
Clears all the lights from the renderer. As with RenderSystem::_addLight this method is for use internally, not by user processes. See SceneManager for user-level light maintenance. Implemented in Ogre::D3DRenderSystem. |
|
Removes a light from the renderers list. As with RenderSystem::_addLight this method is for use internally, not by user processes. See SceneNode for user-level light maintenance. Implemented in Ogre::D3DRenderSystem. |
|
Render something to the active viewport. Low-level rendering interface to perform rendering operations. Unlikely to be used directly by client applications, since the SceneManager and various support classes will be responsible for calling this method. Can only be called between _beginScene and _endScene
Reimplemented in Ogre::D3DRenderSystem. |
|
Sets the global alpha rejection approach for future renders. By default images are rendered regardless of texture alpha. This method lets you change that.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the culling mode for the render system based on the 'vertex winding'. A typical way for the rendering engine to cull triangles is based on the 'vertex winding' of triangles. Vertex winding refers to the direction in which the vertices are passed or indexed to in the rendering operation as viewed from the camera, and will wither be clockwise or anticlockwise (that's 'counterclockwise' for you Americans out there ;) The default is CULL_CLOCKWISE i.e. that only triangles whose vertices are passed/indexed in anticlockwise order are rendered - this is a common approach and is used in 3D studio models for example. You can alter this culling mode if you wish but it is not advised unless you know what you are doing. You may wish to use the CULL_NONE option for mesh data that you cull yourself where the vertex winding is uncertain. Implemented in Ogre::D3DRenderSystem. |
|
Sets the depth bias, NB you should use the Material version of this.
Implemented in Ogre::D3DRenderSystem. |
|
Sets whether or not the depth buffer check is performed before a pixel write.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the comparison function for the depth buffer check. Advanced use only - allows you to choose the function applied to compare the depth values of new and existing pixels in the depth buffer. Only an issue if the deoth buffer check is enabled (see _setDepthBufferCheckEnabled)
Implemented in Ogre::D3DRenderSystem. |
|
Sets the mode of operation for depth buffer tests from this point onwards. Sometimes you may wish to alter the behaviour of the depth buffer to achieve special effects. Because it's unlikely that you'll set these options for an entire frame, but rather use them to tweak settings between rendering objects, this is an internal method (indicated by the '_' prefix) which will be used by a SceneManager implementation rather than directly from the client application. If this method is never called the settings are automatically the same as the default parameters.
Implemented in Ogre::D3DRenderSystem. |
|
Sets whether or not the depth buffer is updated after a pixel write.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the fogging mode for future geometry.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the projection transform matrix.
Implemented in Ogre::D3DRenderSystem. |
|
Sets how to rasterise triangles, as points, wireframe or solid polys.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the global blending factors for combining subsequent renders with the existing frame contents. The result of the blending operation is: final = (texture * sourceFactor) + (pixel * destFactor) Each of the factors is specified as one of a number of options, as specified in the SceneBlendFactor enumerated type.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the surface properties to be used for future rendering. This method sets the the properties of the surfaces of objects to be rendered after it. In this context these surface properties are the amount of each type of light the object reflects (determining it's colour under different types of light), whether it emits light itself, and how shiny it is. Textures are not dealt with here, see the _setTetxure method for details. This method is used by _setMaterial so does not need to be called direct if that method is being used.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the status of a single texture stage. Sets the details of a texture stage, to be used for all primitives rendered afterwards. User processes would not normally call this direct unless rendering primitives themselves - the SubEntity class is designed to manage materials for objects. Note that this method is called by _setMaterial.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the texture addressing mode for a texture unit.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the texture blend modes from a TextureLayer record. Meant for use internally only - apps should use the Material and TextureLayer classes.
Implemented in Ogre::D3DRenderSystem. |
|
Sets a method for automatically calculating texture coordinates for a stage. Should not be used by apps - for use by Ogre only.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the texture coordinate set to use for a texture unit. Meant for use internally - not generally used directly by apps - the Material and TextureLayer classes let you manage textures far more easily.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the texture coordinate transformation matrix for a texture unit.
Implemented in Ogre::D3DRenderSystem. |
|
Utility function for setting all the properties of a texture unit at once. This method is also worth using over the individual texture unit settings because it only sets those settings which are different from the current settings for this unit, thus minimising render state changes. |
|
Sets the view transform matrix.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the provided viewport as the active one for future rendering operations. This viewport is aware of it's own camera and render target. Must be implemented by subclass.
Implemented in Ogre::D3DRenderSystem. |
|
Sets multiple world matrices (vertex blending).
|
|
Sets the world transform matrix.
Implemented in Ogre::D3DRenderSystem. |
|
Registers a FrameListener which will be called back every frame.
|
|
Don't do this anymore, just allow via Root RenderSystem* regPtr = Root::getSingleton().getRenderSystem(); if (!regPtr || regPtr != this) Register self - library user has come to me direct Root::getSingleton().setRenderSystem(this);.
|
|
Generates a packed data version of the passed in ColourValue suitable for use as with this RenderSystem.
Implemented in Ogre::D3DRenderSystem. |
|
Creates and registers a render texture object.
Implemented in Ogre::D3DRenderSystem. |
|
Creates a new rendering window.
Implemented in Ogre::D3DRenderSystem. |
|
Detaches the render target with the passed name from the render system and returns a pointer to it.
|
|
Internal method for raising frame ended events.
|
|
Internal method for raising frame started events.
|
|
Returns the details of this API's configuration options.
Implemented in Ogre::D3DRenderSystem. |
|
Returns a description of an error code.
Implemented in Ogre::D3DRenderSystem. |
|
Returns the name of the rendering system.
Implemented in Ogre::D3DRenderSystem. |
|
Returns a pointer to the render target with the passed name, or NULL if that render target cannot be found.
|
|
Determines the bit depth of the hardware accelerated stencil buffer, if supported.
Implemented in Ogre::D3DRenderSystem. |
|
Returns true if the system is synchronising frames with the monitor vertical blank.
|
|
Determines if this system supports hardware accelerated stencil buffer.
Implemented in Ogre::D3DRenderSystem. |
|
Start up the renderer using the settings selected (Or the defaults if none have been selected).
Reimplemented in Ogre::D3DRenderSystem. |
|
Restart the renderer (normally following a change in settings).
Implemented in Ogre::D3DRenderSystem. |
|
Removes a FrameListener from the list of listening classes.
|
|
Sets the colour & strength of the ambient (global directionless) light in the world.
Implemented in Ogre::D3DRenderSystem. |
|
Sets an option for this API.
Implemented in Ogre::D3DRenderSystem. |
|
Sets whether or not dynamic lighting is enabled.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the type of light shading required (default = Gouraud).
Implemented in Ogre::D3DRenderSystem. |
|
Sets the action to perform if the stencil test passes, but the depth buffer test fails.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the action to perform if the stencil test fails.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the stencil test function.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the stencil buffer mask value.
Implemented in Ogre::D3DRenderSystem. |
|
This method allows you to set all the stencil buffer parameters in one call.
Reimplemented in Ogre::SDLRenderSystem. |
|
Sets the action to perform if both the stencil test and the depth buffer test passes.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the stencil buffer reference value.
Implemented in Ogre::D3DRenderSystem. |
|
Turns stencil buffer checking on or off.
Implemented in Ogre::D3DRenderSystem. |
|
Sets the type of texture filtering used when rendering.
Implemented in Ogre::D3DRenderSystem. |
|
Defines whether or now fullscreen render windows wait for the vertical blank before flipping buffers.
|
|
Shutdown the renderer and cleanup resources.
Reimplemented in Ogre::D3DRenderSystem. |
|
Performs a software vertex blend on the passed in operation.
|
|
Starts / restarts the automatic rendering cycle.
Reimplemented in Ogre::D3DRenderSystem. |
|
Validates the options set for the rendering system, returning a message if there are problems.
Implemented in Ogre::D3DRenderSystem. |
|
The Active render target.
|
|
|
|
|
|
|
|
Set of registered frame listeners.
|
|
|
|
The render targets, ordered by priority.
|
|
The render targets.
|
|
|
|
Temporary buffer for vertex blending in software.
|
|
|
|
|
|
|
|
|
|
Saved set of world matrices.
|
Copyright © 2002 by The OGRE Team