OGRE: Ogre::GLRenderSystem Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::GLRenderSystem Class Reference
RenderSystems » GL

Implementation of GL as a rendering system. More...

`#include <OgreGLRenderSystem.h>`

Inheritance diagram for Ogre::GLRenderSystem:
[legend]

## Public Member Functions
| GLRenderSystem ()
| ~GLRenderSystem ()
void | _copyContentsToMemory (Viewport *vp, const Box &src, const PixelBox &dst, RenderWindow::FrameBuffer buffer) override
| Copies the current contents of the render target to a pixelbox.
DepthBuffer * | _createDepthBufferFor (RenderTarget *renderTarget) override
RenderWindow * | _createRenderWindow (const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0) override
void | _endFrame (void) override
GLStateCacheManager * | _getStateCacheManager ()
void | _initialise () override
void | _oneTimeContextInitialization () override
void | _render (const RenderOperation &op) override
void | _setAlphaRejectSettings (CompareFunction func, unsigned char value, bool alphaToCoverage) override
void | _setCullingMode (CullingMode mode) override
void | _setDepthBias (float constantBias, float slopeScaleBias) override
void | _setDepthBufferParams (bool depthTest=true, bool depthWrite=true, CompareFunction depthFunction=CMPF_LESS_EQUAL) override
void | _setFog (FogMode mode)
void | _setLineWidth (float width) override
void | _setPointParameters (bool attenuationEnabled, Real minSize, Real maxSize) override
void | _setPointSpritesEnabled (bool enabled) override
void | _setPolygonMode (PolygonMode level) override
void | _setRenderTarget (RenderTarget *target) override
| Set current render target to target, enabling its GL context if needed.
void | _setSampler (size_t unit, Sampler &sampler) override
void | _setSurfaceTracking (TrackVertexColourType tracking)
void | _setTexture (size_t unit, bool enabled, const TexturePtr &tex) override
void | _setTextureBlendMode (size_t stage, const LayerBlendModeEx &bm) override
void | _setTextureCoordCalculation (size_t stage, TexCoordCalcMethod m, const Frustum *frustum=0) override
void | _setTextureCoordSet (size_t stage, size_t index) override
void | _setTextureMatrix (size_t stage, const Matrix4 &xform) override
void | _setViewport (Viewport *vp) override
void | _switchContext (GLContext *context)
| Switch GL context, dealing with involved internal cached states too.
void | _unregisterContext (GLContext *context) override
| Unregister a render target->context mapping.
void | _useLights (unsigned short limit) override
void | applyFixedFunctionParams (const GpuProgramParametersPtr &params, uint16 variabilityMask) override
void | beginProfileEvent (const String &eventName) override
| This marks the beginning of an event for GPU profiling.
void | bindGpuProgram (GpuProgram *prg) override
void | bindGpuProgramParameters (GpuProgramType gptype, const GpuProgramParametersPtr &params, uint16 variabilityMask) override
void | bindRenderTarget (RenderTarget *target) override
void | clearFrameBuffer (unsigned int buffers, const ColourValue &colour=ColourValue::Black, float depth=1.0f, unsigned short stencil=0) override
HardwareOcclusionQuery * | createHardwareOcclusionQuery (void) override
MultiRenderTarget * | createMultiRenderTarget (const String &name) override
RenderSystemCapabilities * | createRenderSystemCapabilities () const override
void | enableClipPlane (ushort index, bool enable)
void | endProfileEvent (void) override
| Ends the currently active GPU profiling event.
const GpuProgramParametersPtr & | getFixedFunctionParams (TrackVertexColourType tracking, FogMode fog) override
const String & | getName (void) const override
void | initConfigOptions () override
void | initialiseFromRenderSystemCapabilities (RenderSystemCapabilities *caps, RenderTarget *primary) override
void | markProfileEvent (const String &eventName) override
| Marks an instantaneous event for graphics profilers.
void | setClipPlane (ushort index, Real A, Real B, Real C, Real D)
void | setColourBlendState (const ColourBlendState &state) override
void | setLightingEnabled (bool enabled) override
void | setNormaliseNormals (bool normalise) override
void | setProjectionMatrix (const Matrix4 &m)
void | setScissorTest (bool enabled, const Rect &rect=Rect()) override
void | setShadingType (ShadeOptions so) override
void | setStencilState (const StencilState &state) override
void | setViewMatrix (const Matrix4 &m)
void | setWorldMatrix (const Matrix4 &m)
void | shutdown (void) override
void | unbindGpuProgram (GpuProgramType gptype) override

## Detailed Description

Implementation of GL as a rendering system.

## Constructor & Destructor Documentation

## ◆ GLRenderSystem()

Ogre::GLRenderSystem::GLRenderSystem | ( |  | ) |

## ◆ ~GLRenderSystem()

Ogre::GLRenderSystem::~GLRenderSystem | ( |  | ) |

## Member Function Documentation

## ◆ getFixedFunctionParams()

const GpuProgramParametersPtr & Ogre::GLRenderSystem::getFixedFunctionParams | ( | TrackVertexColourType | tracking,
|  | FogMode | fog )
| override

## ◆ applyFixedFunctionParams()

void Ogre::GLRenderSystem::applyFixedFunctionParams | ( | const GpuProgramParametersPtr & | params,
|  | uint16 | variabilityMask )
| override

## ◆ getName()

const String & Ogre::GLRenderSystem::getName | ( | void |  | ) | const
| override

## ◆ _initialise()

void Ogre::GLRenderSystem::_initialise | ( |  | ) |
| override

## ◆ initConfigOptions()

void Ogre::GLRenderSystem::initConfigOptions | ( |  | ) |
| override

## ◆ createRenderSystemCapabilities()

RenderSystemCapabilities * Ogre::GLRenderSystem::createRenderSystemCapabilities | ( |  | ) | const
| override

## ◆ initialiseFromRenderSystemCapabilities()

void Ogre::GLRenderSystem::initialiseFromRenderSystemCapabilities | ( | RenderSystemCapabilities * | caps,
|  | RenderTarget * | primary )
| override

## ◆ shutdown()

void Ogre::GLRenderSystem::shutdown | ( | void |  | ) |
| override

## ◆ setShadingType()

void Ogre::GLRenderSystem::setShadingType | ( | ShadeOptions | so | ) |
| override

## ◆ setLightingEnabled()

void Ogre::GLRenderSystem::setLightingEnabled | ( | bool | enabled | ) |
| override

## ◆ _createRenderWindow()

RenderWindow * Ogre::GLRenderSystem::_createRenderWindow | ( | const String & | name,
|  | unsigned int | width,
|  | unsigned int | height,
|  | bool | fullScreen,
|  | const NameValuePairList * | miscParams = 0 )
| override

## ◆ _createDepthBufferFor()

DepthBuffer * Ogre::GLRenderSystem::_createDepthBufferFor | ( | RenderTarget * | renderTarget | ) |
| override

## ◆ createMultiRenderTarget()

MultiRenderTarget * Ogre::GLRenderSystem::createMultiRenderTarget | ( | const String & | name | ) |
| override

## ◆ setNormaliseNormals()

void Ogre::GLRenderSystem::setNormaliseNormals | ( | bool | normalise | ) |
| override

## ◆ _useLights()

void Ogre::GLRenderSystem::_useLights | ( | unsigned short | limit | ) |
| override

## ◆ setWorldMatrix()

void Ogre::GLRenderSystem::setWorldMatrix | ( | const Matrix4 & | m | ) |

## ◆ setViewMatrix()

void Ogre::GLRenderSystem::setViewMatrix | ( | const Matrix4 & | m | ) |

## ◆ setProjectionMatrix()

void Ogre::GLRenderSystem::setProjectionMatrix | ( | const Matrix4 & | m | ) |

## ◆ _setSurfaceTracking()

void Ogre::GLRenderSystem::_setSurfaceTracking | ( | TrackVertexColourType | tracking | ) |

## ◆ _setPointParameters()

void Ogre::GLRenderSystem::_setPointParameters | ( | bool | attenuationEnabled,
|  | Real | minSize,
|  | Real | maxSize )
| override

## ◆ _setLineWidth()

void Ogre::GLRenderSystem::_setLineWidth | ( | float | width | ) |
| override

## ◆ _setPointSpritesEnabled()

void Ogre::GLRenderSystem::_setPointSpritesEnabled | ( | bool | enabled | ) |
| override

## ◆ _setTexture()

void Ogre::GLRenderSystem::_setTexture | ( | size_t | unit,
|  | bool | enabled,
|  | const TexturePtr & | tex )
| override

## ◆ _setSampler()

void Ogre::GLRenderSystem::_setSampler | ( | size_t | unit,
|  | Sampler & | sampler )
| override

## ◆ _setTextureCoordSet()

void Ogre::GLRenderSystem::_setTextureCoordSet | ( | size_t | stage,
|  | size_t | index )
| override

## ◆ _setTextureCoordCalculation()

void Ogre::GLRenderSystem::_setTextureCoordCalculation | ( | size_t | stage,
|  | TexCoordCalcMethod | m,
|  | const Frustum * | frustum = 0 )
| override

## ◆ _setTextureBlendMode()

void Ogre::GLRenderSystem::_setTextureBlendMode | ( | size_t | stage,
|  | const LayerBlendModeEx & | bm )
| override

## ◆ _setTextureMatrix()

void Ogre::GLRenderSystem::_setTextureMatrix | ( | size_t | stage,
|  | const Matrix4 & | xform )
| override

## ◆ _setAlphaRejectSettings()

void Ogre::GLRenderSystem::_setAlphaRejectSettings | ( | CompareFunction | func,
|  | unsigned char | value,
|  | bool | alphaToCoverage )
| override

## ◆ _setViewport()

void Ogre::GLRenderSystem::_setViewport | ( | Viewport * | vp | ) |
| override

## ◆ _endFrame()

void Ogre::GLRenderSystem::_endFrame | ( | void |  | ) |
| override

## ◆ _setCullingMode()

void Ogre::GLRenderSystem::_setCullingMode | ( | CullingMode | mode | ) |
| override

## ◆ _setDepthBufferParams()

void Ogre::GLRenderSystem::_setDepthBufferParams | ( | bool | depthTest = true,
|  | bool | depthWrite = true,
|  | CompareFunction | depthFunction = CMPF_LESS_EQUAL )
| override

References Ogre::CMPF_LESS_EQUAL.

## ◆ _setDepthBias()

void Ogre::GLRenderSystem::_setDepthBias | ( | float | constantBias,
|  | float | slopeScaleBias )
| override

## ◆ setColourBlendState()

void Ogre::GLRenderSystem::setColourBlendState | ( | const ColourBlendState & | state | ) |
| override

## ◆ _setFog()

void Ogre::GLRenderSystem::_setFog | ( | FogMode | mode | ) |

## ◆ setClipPlane()

void Ogre::GLRenderSystem::setClipPlane | ( | ushort | index,
|  | Real | A,
|  | Real | B,
|  | Real | C,
|  | Real | D )

## ◆ enableClipPlane()

void Ogre::GLRenderSystem::enableClipPlane | ( | ushort | index,
|  | bool | enable )

## ◆ _setPolygonMode()

void Ogre::GLRenderSystem::_setPolygonMode | ( | PolygonMode | level | ) |
| override

## ◆ setStencilState()

void Ogre::GLRenderSystem::setStencilState | ( | const StencilState & | state | ) |
| override

## ◆ _render()

void Ogre::GLRenderSystem::_render | ( | const RenderOperation & | op | ) |
| override

## ◆ bindGpuProgram()

void Ogre::GLRenderSystem::bindGpuProgram | ( | GpuProgram * | prg | ) |
| override

## ◆ unbindGpuProgram()

void Ogre::GLRenderSystem::unbindGpuProgram | ( | GpuProgramType | gptype | ) |
| override

## ◆ bindGpuProgramParameters()

void Ogre::GLRenderSystem::bindGpuProgramParameters | ( | GpuProgramType | gptype,
|  | const GpuProgramParametersPtr & | params,
|  | uint16 | variabilityMask )
| override

## ◆ setScissorTest()

void Ogre::GLRenderSystem::setScissorTest | ( | bool | enabled,
|  | const Rect & | rect = Rect() )
| override

## ◆ clearFrameBuffer()

void Ogre::GLRenderSystem::clearFrameBuffer | ( | unsigned int | buffers,
|  | const ColourValue & | colour = ColourValue::Black,
|  | float | depth = 1.0f,
|  | unsigned short | stencil = 0 )
| override

References Ogre::ColourValue::Black.

## ◆ createHardwareOcclusionQuery()

HardwareOcclusionQuery * Ogre::GLRenderSystem::createHardwareOcclusionQuery | ( | void |  | ) |
| override

## ◆ _oneTimeContextInitialization()

void Ogre::GLRenderSystem::_oneTimeContextInitialization | ( |  | ) |
| override

## ◆ _switchContext()

void Ogre::GLRenderSystem::_switchContext | ( | GLContext * | context | ) |

Switch GL context, dealing with involved internal cached states too.

## ◆ _setRenderTarget()

void Ogre::GLRenderSystem::_setRenderTarget | ( | RenderTarget * | target | ) |
| override

Set current render target to target, enabling its GL context if needed.

## ◆ bindRenderTarget()

void Ogre::GLRenderSystem::bindRenderTarget | ( | RenderTarget * | target | ) |
| override

## ◆ _unregisterContext()

void Ogre::GLRenderSystem::_unregisterContext | ( | GLContext * | context | ) |
| override

Unregister a render target->context mapping.

If the context of target is the current context, change the context to the main context so it can be destroyed safely.

Note
  This is automatically called by the destructor of GLContext.

## ◆ _getStateCacheManager()

GLStateCacheManager * Ogre::GLRenderSystem::_getStateCacheManager | ( |  | ) |
| inline

## ◆ beginProfileEvent()

void Ogre::GLRenderSystem::beginProfileEvent | ( | const String & | eventName | ) |
| override

This marks the beginning of an event for GPU profiling.

## ◆ endProfileEvent()

void Ogre::GLRenderSystem::endProfileEvent | ( | void |  | ) |
| override

Ends the currently active GPU profiling event.

## ◆ markProfileEvent()

void Ogre::GLRenderSystem::markProfileEvent | ( | const String & | eventName | ) |
| override

Marks an instantaneous event for graphics profilers.

This is equivalent to calling

See also
  beginProfileEvent and
  endProfileEvent back to back.

## ◆ _copyContentsToMemory()

void Ogre::GLRenderSystem::_copyContentsToMemory | ( | Viewport * | vp,
|  | const Box & | src,
|  | const PixelBox & | dst,
|  | RenderWindow::FrameBuffer | buffer )
| override

Copies the current contents of the render target to a pixelbox.

Remarks
  See suggestPixelFormat for a tip as to the best pixel format to extract into, although you can use whatever format you like and the results will be converted.

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

- OgreGLRenderSystem.h