OGRE-Next  3.0.0
Object-Oriented Graphics Rendering Engine
Ogre::RenderSystem Class Referenceabstract

Defines the functionality of a 3D API. More...

#include <OgreRenderSystem.h>

+ Inheritance diagram for Ogre::RenderSystem:

Classes

class  Listener
 Defines a listener on the custom events that this render system can raise. More...
 
struct  RenderSystemContext
 

Public Member Functions

 RenderSystem ()
 Default Constructor. More...
 
virtual ~RenderSystem ()
 Destructor. More...
 
void _addMetrics (const RenderingMetrics &newMetrics)
 
virtual void _beginFrame ()=0
 Signifies the beginning of a frame, i.e. More...
 
virtual void _beginFrameOnce ()
 Signifies the beginning of the main frame. More...
 
void _cleanupDepthBuffers ()
 
virtual void _clearStateAndFlushCommandBuffer ()
 On D3D11 calls ClearState followed by Flush(). More...
 
virtual void _convertOpenVrProjectionMatrix (const Matrix4 &matrix, Matrix4 &dest)
 Converts an OpenVR projection matrix to have the proper depth range and reverse Z settings. More...
 
virtual void _convertProjectionMatrix (const Matrix4 &matrix, Matrix4 &dest)
 Converts a uniform projection matrix to suitable for this render system. More...
 
virtual Window_createRenderWindow (const String &name, uint32 width, uint32 height, bool fullScreen, const NameValuePairList *miscParams=0)=0
 Creates a new rendering window. More...
 
virtual bool _createRenderWindows (const RenderWindowDescriptionList &renderWindowDescriptions, WindowList &createdWindows)
 Creates multiple rendering windows. More...
 
void _dereferenceSharedDepthBuffer (TextureGpu *depthBuffer)
 Releases the reference count on a shared depth buffer. More...
 
virtual void _descriptorSetSamplerCreated (DescriptorSetSampler *newSet)
 
virtual void _descriptorSetSamplerDestroyed (DescriptorSetSampler *set)
 
virtual void _descriptorSetTexture2Created (DescriptorSetTexture2 *newSet)
 
virtual void _descriptorSetTexture2Destroyed (DescriptorSetTexture2 *set)
 
virtual void _descriptorSetTextureCreated (DescriptorSetTexture *newSet)
 
virtual void _descriptorSetTextureDestroyed (DescriptorSetTexture *set)
 
virtual void _descriptorSetUavCreated (DescriptorSetUav *newSet)
 
virtual void _descriptorSetUavDestroyed (DescriptorSetUav *set)
 
virtual void _dispatch (const HlmsComputePso &pso)=0
 
virtual void _endFrame ()=0
 Ends rendering of a frame to the current viewport. More...
 
virtual void _endFrameOnce ()
 Called once per frame, regardless of how many active workspaces there are. More...
 
Viewport_getCurrentRenderViewport ()
 
virtual const String_getDefaultViewportMaterialScheme () const
 Returns the default material scheme used by the render system. More...
 
virtual void _hlmsBlendblockCreated (HlmsBlendblock *newBlock)
 
virtual void _hlmsBlendblockDestroyed (HlmsBlendblock *block)
 
virtual void _hlmsComputePipelineStateObjectCreated (HlmsComputePso *newPso)
 
virtual void _hlmsComputePipelineStateObjectDestroyed (HlmsComputePso *newPso)
 
virtual void _hlmsMacroblockCreated (HlmsMacroblock *newBlock)
 
virtual void _hlmsMacroblockDestroyed (HlmsMacroblock *block)
 
virtual void _hlmsPipelineStateObjectCreated (HlmsPso *newPso)
 
virtual void _hlmsPipelineStateObjectDestroyed (HlmsPso *pso)
 
virtual void _hlmsSamplerblockCreated (HlmsSamplerblock *newBlock)
 
virtual void _hlmsSamplerblockDestroyed (HlmsSamplerblock *block)
 
virtual Window_initialise (bool autoCreateWindow, const String &windowTitle="OGRE Render Window")
 Start up the renderer using the settings selected (Or the defaults if none have been selected). More...
 
virtual void _makeRsProjectionMatrix (const Matrix4 &matrix, Matrix4 &dest, Real nearPlane, Real farPlane, ProjectionType projectionType)
 Takes a regular source projection matrix in range [-1; 1] and converts it to a projection matrix in 'dest' with reverse Z range [1; 0]. More...
 
virtual RenderSystemContext_pauseFrame ()
 Pause rendering for a frame. More...
 
virtual void _render (const CbDrawCallIndexed *cmd)=0
 Renders the VAO. Assumes _setVertexArrayObject has already been called. More...
 
virtual void _render (const CbDrawCallStrip *cmd)=0
 
virtual void _render (const v1::CbDrawCallIndexed *cmd)=0
 Renders a V1 RenderOperation. Assumes _setRenderOperation has already been called. More...
 
virtual void _render (const v1::CbDrawCallStrip *cmd)=0
 
virtual void _render (const v1::RenderOperation &op)
 Render something to the active viewport. More...
 
virtual void _renderEmulated (const CbDrawCallIndexed *cmd)=0
 
virtual void _renderEmulated (const CbDrawCallStrip *cmd)=0
 
virtual void _renderEmulatedNoBaseInstance (const CbDrawCallIndexed *cmd)
 
virtual void _renderEmulatedNoBaseInstance (const CbDrawCallStrip *cmd)
 
virtual void _renderNoBaseInstance (const v1::CbDrawCallIndexed *cmd)
 
virtual void _renderNoBaseInstance (const v1::CbDrawCallStrip *cmd)
 
void _resetMetrics ()
 
virtual void _resumeFrame (RenderSystemContext *context)
 Resume rendering for a frame. More...
 
virtual void _setBindingType (TextureUnitState::BindingType bindigType)
 Set texture unit binding type. More...
 
virtual void _setComputePso (const HlmsComputePso *pso)=0
 Unlike _setPipelineStateObject, the RenderSystem will check if the PSO has changed to avoid redundant state changes (since it's hard to do it at Hlms level) More...
 
virtual void _setCurrentDeviceFromTexture (TextureGpu *texture)=0
 Because Ogre doesn't (yet) have the notion of a 'device' or 'GL context', this function lets Ogre know which device should be used by providing a texture. More...
 
virtual void _setGeometryTexture (size_t unit, TextureGpu *tex)
 
virtual void _setHlmsSamplerblock (uint8 texUnit, const HlmsSamplerblock *Samplerblock)=0
 See HlmsSamplerblock. More...
 
virtual void _setIndirectBuffer (IndirectBufferPacked *indirectBuffer)=0
 
virtual void _setPipelineStateObject (const HlmsPso *pso)
 
virtual void _setPointParameters (Real size, bool attenuationEnabled, Real constant, Real linear, Real quadratic, Real minSize, Real maxSize)=0
 Sets the size of points and how they are attenuated with distance. More...
 
virtual void _setPointSpritesEnabled (bool enabled)=0
 Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points. More...
 
virtual void _setProjectionMatrix (const Matrix4 &m)=0
 Sets the projection transform matrix. More...
 
virtual void _setRenderOperation (const v1::CbRenderOp *cmd)=0
 
virtual void _setSamplers (uint32 slotStart, const DescriptorSetSampler *set)=0
 
virtual void _setSamplersCS (uint32 slotStart, const DescriptorSetSampler *set)=0
 
virtual void _setSurfaceParams (const ColourValue &ambient, const ColourValue &diffuse, const ColourValue &specular, const ColourValue &emissive, Real shininess, TrackVertexColourType tracking=TVC_NONE)=0
 Sets the surface properties to be used for future rendering. More...
 
virtual void _setTessellationDomainTexture (size_t unit, TextureGpu *tex)
 
virtual void _setTessellationHullTexture (size_t unit, TextureGpu *tex)
 
virtual void _setTexture (size_t unit, TextureGpu *texPtr, bool bDepthReadOnly)=0
 Sets the texture to bind to a given texture unit. More...
 
virtual void _setTextureBlendMode (size_t unit, const LayerBlendModeEx &bm)=0
 Sets the texture blend modes from a TextureUnitState record. More...
 
virtual void _setTextureCoordCalculation (size_t unit, TexCoordCalcMethod m, const Frustum *frustum=0)=0
 Sets a method for automatically calculating texture coordinates for a stage. More...
 
virtual void _setTextureMatrix (size_t unit, const Matrix4 &xform)=0
 Sets the texture coordinate transformation matrix for a texture unit. More...
 
virtual void _setTextureProjectionRelativeTo (bool enabled, const Vector3 &pos)
 Notify the rendersystem that it should adjust texture projection to be relative to a different origin. More...
 
virtual void _setTextures (uint32 slotStart, const DescriptorSetTexture *set, uint32 hazardousTexIdx)=0
 
virtual void _setTextures (uint32 slotStart, const DescriptorSetTexture2 *set)=0
 
virtual void _setTexturesCS (uint32 slotStart, const DescriptorSetTexture *set)=0
 
virtual void _setTexturesCS (uint32 slotStart, const DescriptorSetTexture2 *set)=0
 
virtual void _setTextureUnitSettings (size_t texUnit, TextureUnitState &tl)
 Utility function for setting all the properties of a texture unit at once. More...
 
virtual void _setUavCS (uint32 slotStart, const DescriptorSetUav *set)=0
 
virtual void _setVertexArrayObject (const VertexArrayObject *vao)=0
 Part of the low level rendering interface. More...
 
virtual void _setVertexTexture (size_t unit, TextureGpu *tex)
 Binds a texture to a vertex, geometry, compute, tessellation hull or tessellation domain sampler. More...
 
virtual void _setViewMatrix (const Matrix4 &m)=0
 Sets the view transform matrix. More...
 
virtual void _setWorldMatrices (const Matrix4 *m, unsigned short count)
 Sets multiple world matrices (vertex blending). More...
 
virtual void _setWorldMatrix (const Matrix4 &m)=0
 Sets the world transform matrix. More...
 
virtual void _startLegacyV1Rendering ()
 May override the current VertexArrayObject! More...
 
void _update ()
 Called once per frame, regardless of how many active workspaces there are. More...
 
virtual void _useLights (const LightList &lights, unsigned short limit)=0
 Tells the rendersystem to use the attached set of lights (and no others) up to the number specified (this allows the same list to be used with different count limits) More...
 
virtual void addClipPlane (const Plane &p)
 Add a user clipping plane. More...
 
virtual void addClipPlane (Real A, Real B, Real C, Real D)
 Add a user clipping plane. More...
 
virtual void addListener (Listener *l)
 Adds a listener to the custom events that this render system can raise. More...
 
virtual bool areFixedFunctionLightsInViewSpace () const
 Are fixed-function lights provided in view space? Affects optimisation. More...
 
virtual void beginGPUSampleProfile (const String &name, uint32 *hashCache)=0
 
virtual void beginProfileEvent (const String &eventName)=0
 This marks the beginning of an event for GPU profiling. More...
 
virtual void beginRenderPassDescriptor (RenderPassDescriptor *desc, TextureGpu *anyTarget, uint8 mipLevel, const Vector4 *viewportSizes, const Vector4 *scissors, uint32 numViewports, bool overlaysEnabled, bool warnIfRtvWasFlushed)
 When the descriptor is set to Load clear, two possible things may happen: More...
 
virtual void bindGpuProgramParameters (GpuProgramType gptype, GpuProgramParametersSharedPtr params, uint16 variabilityMask)=0
 Bind Gpu program parameters. More...
 
virtual void bindGpuProgramPassIterationParameters (GpuProgramType gptype)=0
 Only binds Gpu program parameters used for passes that have more than one iteration rendering. More...
 
virtual bool checkExtension (const String &ext) const
 Checks for the presense of an API-specific extension (eg. Vulkan, GL) More...
 
virtual void clearFrameBuffer (RenderPassDescriptor *renderPassDesc, TextureGpu *anyTarget, uint8 mipLevel)=0
 Immediately clears the whole frame buffer on the selected RenderPassDescriptor. More...
 
virtual void compositorWorkspaceBegin (CompositorWorkspace *workspace, const bool forceBeginFrame)
 See RenderSystem::updateCompositorManager. More...
 
virtual void compositorWorkspaceEnd (CompositorWorkspace *workspace, const bool forceEndFrame)
 See RenderSystem::updateCompositorManager. More...
 
virtual void compositorWorkspaceUpdate (CompositorWorkspace *workspace)
 See RenderSystem::updateCompositorManager. More...
 
virtual void convertColourValue (const ColourValue &colour, uint32 *pDest)
 Generates a packed data version of the passed in ColourValue suitable for use as with this RenderSystem. More...
 
virtual HardwareOcclusionQuerycreateHardwareOcclusionQuery ()=0
 Create an object for performing hardware occlusion queries. More...
 
virtual RenderPassDescriptorcreateRenderPassDescriptor ()=0
 
virtual RenderSystemCapabilitiescreateRenderSystemCapabilities () const =0
 Query the real capabilities of the GPU and driver in the RenderSystem. More...
 
virtual void debugAnnotationPop ()
 
virtual void debugAnnotationPush (const String &event)
 Specifically meant to mark passes in RenderDoc. More...
 
virtual void deinitGPUProfiling ()=0
 
virtual void destroyHardwareOcclusionQuery (HardwareOcclusionQuery *hq)
 Destroy a hardware occlusion query object. More...
 
void destroyRenderPassDescriptor (RenderPassDescriptor *renderPassDesc)
 
virtual void destroyRenderWindow (Window *window)
 Destroys a render window. More...
 
virtual void endCopyEncoder ()
 Required when caller will soon start analyzing barriers (e.g. More...
 
virtual void endGpuDebuggerFrameCapture (Window *window, const bool bDiscard=false)
 See RenderSystem::startGpuDebuggerFrameCapture Call this function when you're done capturing a frame. More...
 
virtual void endGPUSampleProfile (const String &name)=0
 
virtual void endProfileEvent ()=0
 Ends the currently active GPU profiling event. More...
 
virtual void endRenderPassDescriptor ()
 
virtual void executeRenderPassDescriptorDelayedActions ()
 Metal needs to delay RenderCommand creation to the last minute, because we can't issue blit operations (e.g. More...
 
virtual void executeResourceTransition (const ResourceTransitionArray &rstCollection)
 
virtual void flushCommands ()=0
 
BarrierSolvergetBarrierSolver ()
 
BoundUav getBoundUav (size_t slot) const
 
const RenderSystemCapabilitiesgetCapabilities () const
 Gets the capabilities of the render system. More...
 
virtual VertexElementType getColourVertexElementType () const =0
 Get the native VertexElementType for a compact 32-bit colour value for this rendersystem. More...
 
virtual ConfigOptionMapgetConfigOptions ()=0
 Returns the details of this API's configuration options. More...
 
RenderPassDescriptorgetCurrentPassDescriptor ()
 
ViewportgetCurrentRenderViewports ()
 
virtual void getCustomAttribute (const String &name, void *pData)
 Gets a custom (maybe platform-specific) attribute. More...
 
bool getDebugShaders () const
 
virtual TextureGpugetDepthBufferFor (TextureGpu *colourTexture, uint16 poolId, bool preferDepthTexture, PixelFormatGpu depthBufferFormat)
 
virtual unsigned int getDisplayMonitorCount () const =0
 Gets the number of display monitors. More...
 
virtual const DriverVersiongetDriverVersion () const
 Returns the driver version. More...
 
virtual String getErrorDescription (long errorNumber) const =0
 Returns a description of an error code. More...
 
virtual const StringgetFriendlyName () const =0
 Returns the friendly name of the render system. More...
 
v1::HardwareVertexBufferSharedPtr getGlobalInstanceVertexBuffer () const
 Returns the global instance vertex buffer. More...
 
v1::VertexDeclarationgetGlobalInstanceVertexBufferVertexDeclaration () const
 Gets vertex declaration for the global vertex buffer for the global instancing. More...
 
size_t getGlobalNumberOfInstances () const
 Gets the global number of instances. More...
 
virtual Real getHorizontalTexelOffset ()=0
 Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this rendersystem. More...
 
bool getInvertedClipSpaceY () const
 +Y is downwards in NDC (Normalized Device Coordinates). Only Vulkan has this problem. More...
 
virtual bool getInvertVertexWinding () const
 Indicates whether or not the vertex windings set will be inverted for the current render (e.g. More...
 
uint32 getMaxBoundViewports ()
 
virtual Real getMaximumDepthInputValue ()=0
 Gets the maximum (farthest) depth value to be used when rendering using identity transforms. More...
 
const RenderingMetricsgetMetrics () const
 
virtual Real getMinimumDepthInputValue ()=0
 Gets the minimum (closest) depth value to be used when rendering using identity transforms. More...
 
RenderSystemCapabilitiesgetMutableCapabilities ()
 Get a pointer to the current capabilities being used by the RenderSystem. More...
 
virtual const StringgetName () const =0
 Returns the name of the rendering system. More...
 
uint16 getNativeShadingLanguageVersion () const
 Gets the native shading language version for this render system. More...
 
virtual size_t getNumPriorityConfigOptions () const
 Number of priority config options in RenderSystem::getPriorityConfigOption. More...
 
virtual const PixelFormatToShaderTypegetPixelFormatToShaderType () const =0
 
virtual const char * getPriorityConfigOption (size_t idx) const
 Some options depend on other options. More...
 
RENDERDOC_API_1_4_1 * getRenderDocApi ()
 Returns the RenderDoc API handle in case you want to do more advanced functionality than what we expose. More...
 
virtual const StringVectorgetRenderSystemEvents () const
 Gets a list of the rendersystem specific events that this rendersystem can raise. More...
 
virtual Real getRSDepthRange () const
 OpenGL depth is in range [-1;1] so it returns 2.0f; D3D11 & Metal are in range [0;1] so it returns 1.0f;. More...
 
const StencilParamsgetStencilBufferParams () const
 
TextureGpuManagergetTextureGpuManager () const
 
VaoManagergetVaoManager () const
 
virtual Real getVerticalTexelOffset ()=0
 Returns the vertical texel offset value required for mapping texel origins to pixel origins in this rendersystem. More...
 
bool getWBufferEnabled () const
 Returns true if the renderer will try to use W-buffers when available. More...
 
virtual bool hasAnisotropicMipMapFilter () const =0
 Determines if the system has anisotropic mip map filter support. More...
 
virtual void initGPUProfiling ()=0
 
virtual bool isGpuProgramBound (GpuProgramType gptype)
 Returns whether or not a Gpu program of the given type is currently bound. More...
 
bool isReverseDepth () const
 
virtual bool isSameLayout (ResourceLayout::Layout a, ResourceLayout::Layout b, const TextureGpu *texture, bool bIsDebugCheck) const
 Returns true if 'a' and 'b' internally map to the same layout and should be considered equivalent for a given texture. More...
 
virtual bool isStaticBufferLockable () const
 
bool loadRenderDocApi ()
 Explicitly loads RenderDoc. More...
 
virtual void markProfileEvent (const String &event)=0
 Marks an instantaneous event for graphics profilers. More...
 
virtual void postExtraThreadsStarted ()=0
 
virtual void preExtraThreadsStarted ()=0
 Tell the rendersystem to perform any prep tasks it needs to directly before other threads which might access the rendering API are registered. More...
 
void queueBindUAVs (const DescriptorSetUav *descSetUav)
 Queues the binding of an UAV to the binding point/slot. More...
 
virtual void registerThread ()=0
 Register the an additional thread which may make calls to rendersystem-related objects. More...
 
virtual void reinitialise ()=0
 Restart the renderer (normally following a change in settings). More...
 
virtual void removeListener (Listener *l)
 Remove a listener to the custom events that this render system can raise. More...
 
virtual void resetClipPlanes ()
 Clears the user clipping region. More...
 
virtual void setClipPlanes (const PlaneList &clipPlanes)
 Sets the user clipping region. More...
 
virtual void setConfigOption (const String &name, const String &value)=0
 Sets an option for this API. More...
 
virtual void setCurrentPassIterationCount (const size_t count)
 set the current multi pass count value. More...
 
void setDebugShaders (bool bDebugShaders)
 Instructs the RenderSystem to compile shaders without optimizations and with debug information, for easier debugging on APIs that support it. More...
 
virtual void setDeriveDepthBias (bool derive, float baseValue=0.0f, float multiplier=0.0f, float slopeScale=0.0f)
 Tell the render system whether to derive a depth bias on its own based on the values passed to it in setCurrentPassIterationCount. More...
 
virtual bool setDrawBuffer (ColourBufferType colourBuffer)
 Sets the colour buffer that the render system will to draw. More...
 
void setGlobalInstanceVertexBuffer (const v1::HardwareVertexBufferSharedPtr &val)
 Sets the global instance vertex buffer. More...
 
void setGlobalInstanceVertexBufferVertexDeclaration (v1::VertexDeclaration *val)
 Sets vertex declaration for the global vertex buffer for the global instancing. More...
 
void setGlobalNumberOfInstances (const size_t val)
 Sets the global number of instances. More...
 
void setInvertVertexWinding (bool invert)
 Sets whether or not vertex windings set should be inverted; this can be important for rendering reflections. More...
 
void setMetricsRecordingEnabled (bool bEnable)
 
virtual void setStencilBufferParams (uint32 refValue, const StencilParams &stencilParams)
 This method allows you to set all the stencil buffer parameters in one call. More...
 
void setUavStartingSlot (uint32 startingSlot)
 In Direct3D11, UAV & RenderTargets share the same slots. More...
 
void setWBufferEnabled (bool enabled)
 Sets whether or not W-buffers are enabled if they are available for this renderer. More...
 
virtual void shutdown ()
 Shutdown the renderer and cleanup resources. More...
 
virtual bool startGpuDebuggerFrameCapture (Window *window)
 Programmatically performs a GPU capture when attached to a GPU debugger like RenderDoc or Metal Graphics Debugger. More...
 
virtual void unregisterThread ()=0
 Unregister an additional thread which may make calls to rendersystem-related objects. More...
 
virtual void updateCompositorManager (CompositorManager2 *compositorManager)
 This gives the renderer a chance to perform the compositor update in a special way. More...
 
virtual void useCustomRenderSystemCapabilities (RenderSystemCapabilities *capabilities)
 Force the render system to use the special capabilities. More...
 
virtual String validateConfigOptions ()=0
 Validates the options set for the rendering system, returning a message if there are problems. More...
 
virtual bool validateDevice (bool forceDeviceElection=false)
 Some render systems have moments when GPU device is temporarily unavailable, for example when D3D11 device is lost, or when iOS app is in background, etc. More...
 
virtual SampleDescription validateSampleDescription (const SampleDescription &sampleDesc, PixelFormatGpu format)
 Returns supported sample description for requested FSAA mode, with graceful downgrading. More...
 

Static Public Member Functions

static void addSharedListener (Listener *listener)
 Sets shared listener. More...
 
static void fireSharedEvent (const String &name, const NameValuePairList *params=0)
 
static void removeSharedListener (Listener *listener)
 Remove shared listener to the custom events that this render system can raise. More...
 
static CompareFunction reverseCompareFunction (CompareFunction depthFunc)
 Reverts the compare order e.g. More...
 

Detailed Description

Defines the functionality of a 3D API.

Remarks
The RenderSystem class provides a base interface which abstracts the general functionality of the 3D API e.g. Direct3D or OpenGL. Whilst a few of the general methods have implementations, most of this class is abstract, requiring a subclass based on a specific API to be constructed to provide the full functionality. Note there are 2 levels to the interface - one which will be used often by the caller of the Ogre library, and one which is at a lower level and will be used by the other classes provided by Ogre. These lower level methods are prefixed with '_' to differentiate them. The advanced user of the library may use these lower level methods to access the 3D API at a more fundamental level (dealing direct with render states and rendering primitives), but still benefiting from Ogre's abstraction of exactly which 3D API is in use.
Author
Steven Streeting
Version
1.0

Constructor & Destructor Documentation

◆ RenderSystem()

Ogre::RenderSystem::RenderSystem ( )

Default Constructor.

◆ ~RenderSystem()

virtual Ogre::RenderSystem::~RenderSystem ( )
virtual

Destructor.

Member Function Documentation

◆ _addMetrics()

void Ogre::RenderSystem::_addMetrics ( const RenderingMetrics newMetrics)

◆ _beginFrame()

virtual void Ogre::RenderSystem::_beginFrame ( )
pure virtual

Signifies the beginning of a frame, i.e.

the start of rendering on a single viewport. Will occur several times per complete frame if multiple viewports exist.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _beginFrameOnce()

virtual void Ogre::RenderSystem::_beginFrameOnce ( )
virtual

Signifies the beginning of the main frame.

i.e. will only be called once per frame, not per viewport

Reimplemented in Ogre::MetalRenderSystem.

◆ _cleanupDepthBuffers()

void Ogre::RenderSystem::_cleanupDepthBuffers ( )

◆ _clearStateAndFlushCommandBuffer()

virtual void Ogre::RenderSystem::_clearStateAndFlushCommandBuffer ( )
virtual

On D3D11 calls ClearState followed by Flush().

On GL3+ it calls glFlush

Do not call this function while inside rendering internals, as it will clear the device state, thus leaving it inconsistent with what we think it is set to.

Reimplemented in Ogre::D3D11RenderSystem.

◆ _convertOpenVrProjectionMatrix()

virtual void Ogre::RenderSystem::_convertOpenVrProjectionMatrix ( const Matrix4 matrix,
Matrix4 dest 
)
virtual

Converts an OpenVR projection matrix to have the proper depth range and reverse Z settings.

Parameters
matrix
dest

Reimplemented in Ogre::GL3PlusRenderSystem.

◆ _convertProjectionMatrix()

virtual void Ogre::RenderSystem::_convertProjectionMatrix ( const Matrix4 matrix,
Matrix4 dest 
)
virtual

Converts a uniform projection matrix to suitable for this render system.

Remarks
Because different APIs have different requirements (some incompatible) for the projection matrix, this method allows each to implement their own correctly and pass back a generic OGRE matrix for storage in the engine.

Reimplemented in Ogre::NULLRenderSystem, and Ogre::GL3PlusRenderSystem.

◆ _createRenderWindow()

virtual Window* Ogre::RenderSystem::_createRenderWindow ( const String name,
uint32  width,
uint32  height,
bool  fullScreen,
const NameValuePairList miscParams = 0 
)
pure virtual

Creates a new rendering window.

Remarks
This method creates a new rendering window as specified by the paramteters. The rendering system could be responible for only a single window (e.g. in the case of a game), or could be in charge of multiple ones (in the case of a level editor). The option to create the window as a child of another is therefore given. This method will create an appropriate subclass of RenderWindow depending on the API and platform implementation.
After creation, this window can be retrieved using getRenderTarget().
Parameters
nameThe name of the window. Used in other methods later like setRenderTarget and getRenderTarget.
widthThe width of the new window.
heightThe height of the new window.
fullScreenSpecify true to make the window full screen without borders, title bar or menu bar.
miscParamsA NameValuePairList describing the other parameters for the new rendering window. Options are case sensitive. Unrecognised parameters will be ignored silently. These values might be platform dependent, but these are present for all platforms unless indicated otherwise:
Key Type/Values Default Description Notes
title Any string RenderTarget name The title of the window that will appear in the title bar  
colourDepth 16, 32 Desktop depth Colour depth of the resulting rendering window; only applies if fullScreen Win32 Specific
left Positive integers Centred Screen x coordinate from left  
top Positive integers Centred Screen y coordinate from left  
depthBuffer true, false true Use depth buffer DirectX9 specific
externalWindowHandle Win32: HWND as integer
GLX: poslong:posint:poslong (display*:screen:windowHandle) or poslong:posint:poslong:poslong (display*:screen:windowHandle:XVisualInfo*)
OS X Cocoa: OgreGLView address as an integer. You can pass NSView or NSWindow too, but should perform OgreGLView callbacks into the Ogre manually. iOS: UIWindow address as an integer
0 (none) External window handle, for embedding the OGRE render in an existing window  
externalGLControl true, false false Let the external window control OpenGL i.e. don't select a pixel format for the window, do not change v-sync and do not swap buffer. When set to true, the calling application is responsible of OpenGL initialization and buffer swapping. It should also create an OpenGL context for its own rendering, Ogre will create one for its use. Then the calling application must also enable Ogre OpenGL context before calling any Ogre function and restore its OpenGL context after these calls. OpenGL specific
externalGLContext Context as Unsigned Long 0 (create own context) Use an externally created GL context OpenGL Specific
parentWindowHandle Win32: HWND as integer
GLX: poslong:posint:poslong (display*:screen:windowHandle) or poslong:posint:poslong:poslong (display*:screen:windowHandle:XVisualInfo*)
0 (none) Parent window handle, for embedding the OGRE in a child of an external window  
contentScalingFactor Positive Float greater than 1.0 The default content scaling factor of the screen Specifies the CAEAGLLayer content scaling factor. Only supported on iOS 4 or greater. This can be useful to limit the resolution of the OpenGL ES backing store. For example, the iPhone 4's native resolution is 960 x 640. Windows are always 320 x 480, if you would like to limit the display to 720 x 480, specify 1.5 as the scaling factor. iOS Specific  
externalViewHandle UIView pointer as an integer 0 External view handle, for rendering OGRE render in an existing view iOS Specific  
externalViewControllerHandle UIViewController pointer as an integer 0 External view controller handle, for embedding OGRE in an existing view controller iOS Specific  
externalSharegroup EAGLSharegroup pointer as an integer 0 External sharegroup, used to shared GL resources between contexts iOS Specific  
Full Screen true, false false Specify whether to create the window in full screen mode OS X Specific  
MSAA Positive integer (usually 1, 2, 4, 8, 16) 1 Multisample antialiasing factor  
MSAA_Quality Depends on RenderSystem and hardware. Currently supports:
0 ... infinite number (depends on HW)
Blank Full screen antialiasing hint  
displayFrequency Refresh rate in Hertz (e.g. 60, 75, 100) Desktop vsync rate Display frequency rate, for fullscreen mode  
vsync true, false false Synchronize buffer swaps to monitor vsync, eliminating tearing at the expense of a fixed frame rate  
vsyncInterval 1, 2, 3, 4 1 If vsync is enabled, the minimum number of vertical blanks that should occur between renders. For example if vsync is enabled, the refresh rate is 60 and this is set to 2, then the frame rate will be locked at 30.  
border none, fixed, resize resize The type of window border (in windowed mode)  
outerDimensions true, false false Whether the width/height is expressed as the size of the outer window, rather than the content area  
useNVPerfHUD true, false false Enable the use of nVidia NVPerfHUD  
gamma true, false false Enable hardware conversion from linear colour space to gamma colour space on rendering to the window.  
enableDoubleClick true, false false Enable the window to keep track and transmit double click messages. Win32 Specific
MSAA Positive integer (usually 0, 2, 4, 8, 16) 0 Full screen antialiasing factor Android Specific
CSAA Positive integer (usually 0, 2, 4, 8, 16) 0 Coverage sampling factor (https://www.khronos.org/registry/egl/extensions/NV/EGL_NV_coverage_sample.txt) Android Specific
maxColourBufferSize Positive integer (usually 16, 32) 32 Max EGL_BUFFER_SIZE Android Specific
minColourBufferSize Positive integer (usually 16, 32) 16 Min EGL_BUFFER_SIZE Android Specific
maxStencilBufferSize Positive integer (usually 0, 8) 0 EGL_STENCIL_SIZE Android Specific
maxDepthBufferSize Positive integer (usually 0, 16, 24) 16 EGL_DEPTH_SIZE Android Specific

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.

◆ _createRenderWindows()

virtual bool Ogre::RenderSystem::_createRenderWindows ( const RenderWindowDescriptionList renderWindowDescriptions,
WindowList createdWindows 
)
virtual

Creates multiple rendering windows.

Parameters
renderWindowDescriptionsArray of structures containing the descriptions of each render window. The structure's members are the same as the parameters of _createRenderWindow:
  • name
  • width
  • height
  • fullScreen
  • miscParams
See _createRenderWindow for details about each member.
createdWindowsThis array will hold the created render windows.
Returns
true on success.

Reimplemented in Ogre::GL3PlusRenderSystem.

◆ _dereferenceSharedDepthBuffer()

void Ogre::RenderSystem::_dereferenceSharedDepthBuffer ( TextureGpu depthBuffer)

Releases the reference count on a shared depth buffer.

Does nothing if input is not a shared depth buffer.

◆ _descriptorSetSamplerCreated()

virtual void Ogre::RenderSystem::_descriptorSetSamplerCreated ( DescriptorSetSampler newSet)
inlinevirtual

Reimplemented in Ogre::VulkanRenderSystem.

◆ _descriptorSetSamplerDestroyed()

virtual void Ogre::RenderSystem::_descriptorSetSamplerDestroyed ( DescriptorSetSampler set)
inlinevirtual

Reimplemented in Ogre::VulkanRenderSystem.

◆ _descriptorSetTexture2Created()

virtual void Ogre::RenderSystem::_descriptorSetTexture2Created ( DescriptorSetTexture2 newSet)
inlinevirtual

◆ _descriptorSetTexture2Destroyed()

virtual void Ogre::RenderSystem::_descriptorSetTexture2Destroyed ( DescriptorSetTexture2 set)
inlinevirtual

◆ _descriptorSetTextureCreated()

virtual void Ogre::RenderSystem::_descriptorSetTextureCreated ( DescriptorSetTexture newSet)
inlinevirtual

◆ _descriptorSetTextureDestroyed()

virtual void Ogre::RenderSystem::_descriptorSetTextureDestroyed ( DescriptorSetTexture set)
inlinevirtual

◆ _descriptorSetUavCreated()

virtual void Ogre::RenderSystem::_descriptorSetUavCreated ( DescriptorSetUav newSet)
inlinevirtual

◆ _descriptorSetUavDestroyed()

virtual void Ogre::RenderSystem::_descriptorSetUavDestroyed ( DescriptorSetUav set)
inlinevirtual

◆ _dispatch()

virtual void Ogre::RenderSystem::_dispatch ( const HlmsComputePso pso)
pure virtual

◆ _endFrame()

virtual void Ogre::RenderSystem::_endFrame ( )
pure virtual

◆ _endFrameOnce()

virtual void Ogre::RenderSystem::_endFrameOnce ( )
virtual

Called once per frame, regardless of how many active workspaces there are.

Gets called AFTER all RenderWindows have been swapped.

Reimplemented in Ogre::VulkanRenderSystem, and Ogre::MetalRenderSystem.

◆ _getCurrentRenderViewport()

Viewport& Ogre::RenderSystem::_getCurrentRenderViewport ( )
inline

◆ _getDefaultViewportMaterialScheme()

virtual const String& Ogre::RenderSystem::_getDefaultViewportMaterialScheme ( ) const
virtual

Returns the default material scheme used by the render system.

Systems that use the RTSS to emulate a fixed function pipeline (e.g. OpenGL ES 2, GL3+, DX11) need to override this function to return the default material scheme of the RTSS ShaderGenerator.

This is currently only used to set the default material scheme for viewports. It is a necessary step on these render systems for render textures to be rendered into properly.

Referenced by Ogre::CompositorPassSceneDef::CompositorPassSceneDef().

◆ _hlmsBlendblockCreated()

virtual void Ogre::RenderSystem::_hlmsBlendblockCreated ( HlmsBlendblock newBlock)
inlinevirtual

◆ _hlmsBlendblockDestroyed()

virtual void Ogre::RenderSystem::_hlmsBlendblockDestroyed ( HlmsBlendblock block)
inlinevirtual

◆ _hlmsComputePipelineStateObjectCreated()

virtual void Ogre::RenderSystem::_hlmsComputePipelineStateObjectCreated ( HlmsComputePso newPso)
inlinevirtual

◆ _hlmsComputePipelineStateObjectDestroyed()

virtual void Ogre::RenderSystem::_hlmsComputePipelineStateObjectDestroyed ( HlmsComputePso newPso)
inlinevirtual

◆ _hlmsMacroblockCreated()

virtual void Ogre::RenderSystem::_hlmsMacroblockCreated ( HlmsMacroblock newBlock)
inlinevirtual

◆ _hlmsMacroblockDestroyed()

virtual void Ogre::RenderSystem::_hlmsMacroblockDestroyed ( HlmsMacroblock block)
inlinevirtual

◆ _hlmsPipelineStateObjectCreated()

virtual void Ogre::RenderSystem::_hlmsPipelineStateObjectCreated ( HlmsPso newPso)
inlinevirtual

◆ _hlmsPipelineStateObjectDestroyed()

virtual void Ogre::RenderSystem::_hlmsPipelineStateObjectDestroyed ( HlmsPso pso)
inlinevirtual

◆ _hlmsSamplerblockCreated()

virtual void Ogre::RenderSystem::_hlmsSamplerblockCreated ( HlmsSamplerblock newBlock)
inlinevirtual

◆ _hlmsSamplerblockDestroyed()

virtual void Ogre::RenderSystem::_hlmsSamplerblockDestroyed ( HlmsSamplerblock block)
inlinevirtual

◆ _initialise()

virtual Window* Ogre::RenderSystem::_initialise ( bool  autoCreateWindow,
const String windowTitle = "OGRE Render Window" 
)
virtual

Start up the renderer using the settings selected (Or the defaults if none have been selected).

Remarks
Called by Root::setRenderSystem. Shouldn't really be called directly, although this can be done if the app wants to.
Parameters
autoCreateWindowIf true, creates a render window automatically, based on settings chosen so far. This saves an extra call to _createRenderWindow for the main render window.
windowTitleSets the app window title
Returns
A pointer to the automatically created window, if requested, otherwise null.

Reimplemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _makeRsProjectionMatrix()

virtual void Ogre::RenderSystem::_makeRsProjectionMatrix ( const Matrix4 matrix,
Matrix4 dest,
Real  nearPlane,
Real  farPlane,
ProjectionType  projectionType 
)
virtual

Takes a regular source projection matrix in range [-1; 1] and converts it to a projection matrix in 'dest' with reverse Z range [1; 0].

_convertProjectionMatrix does the same thing but is more generic. This version assumes a standard projection matrix (i.e. not oblique) to maximize precision

Parameters
matrix
dest
nearPlane
farPlane
projectionType

Reimplemented in Ogre::GL3PlusRenderSystem.

◆ _pauseFrame()

virtual RenderSystemContext* Ogre::RenderSystem::_pauseFrame ( )
virtual

Pause rendering for a frame.

This has to be called after _beginFrame and before _endFrame. Will usually be called by the SceneManager, don't use this manually unless you know what you are doing.

◆ _render() [1/5]

virtual void Ogre::RenderSystem::_render ( const CbDrawCallIndexed cmd)
pure virtual

Renders the VAO. Assumes _setVertexArrayObject has already been called.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _render() [2/5]

virtual void Ogre::RenderSystem::_render ( const CbDrawCallStrip cmd)
pure virtual

◆ _render() [3/5]

virtual void Ogre::RenderSystem::_render ( const v1::CbDrawCallIndexed cmd)
pure virtual

Renders a V1 RenderOperation. Assumes _setRenderOperation has already been called.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _render() [4/5]

◆ _render() [5/5]

virtual void Ogre::RenderSystem::_render ( const v1::RenderOperation op)
virtual

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

Parameters
opA rendering operation instance, which contains details of the operation to be performed.

Reimplemented in Ogre::VulkanRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _renderEmulated() [1/2]

virtual void Ogre::RenderSystem::_renderEmulated ( const CbDrawCallIndexed cmd)
pure virtual

◆ _renderEmulated() [2/2]

virtual void Ogre::RenderSystem::_renderEmulated ( const CbDrawCallStrip cmd)
pure virtual

◆ _renderEmulatedNoBaseInstance() [1/2]

virtual void Ogre::RenderSystem::_renderEmulatedNoBaseInstance ( const CbDrawCallIndexed cmd)
inlinevirtual

◆ _renderEmulatedNoBaseInstance() [2/2]

virtual void Ogre::RenderSystem::_renderEmulatedNoBaseInstance ( const CbDrawCallStrip cmd)
inlinevirtual

◆ _renderNoBaseInstance() [1/2]

virtual void Ogre::RenderSystem::_renderNoBaseInstance ( const v1::CbDrawCallIndexed cmd)
inlinevirtual

◆ _renderNoBaseInstance() [2/2]

virtual void Ogre::RenderSystem::_renderNoBaseInstance ( const v1::CbDrawCallStrip cmd)
inlinevirtual

◆ _resetMetrics()

void Ogre::RenderSystem::_resetMetrics ( )

◆ _resumeFrame()

virtual void Ogre::RenderSystem::_resumeFrame ( RenderSystemContext context)
virtual

Resume rendering for a frame.

This has to be called after a _pauseFrame call Will usually be called by the SceneManager, don't use this manually unless you know what you are doing.

Parameters
contextthe render system context, as returned by _pauseFrame

◆ _setBindingType()

virtual void Ogre::RenderSystem::_setBindingType ( TextureUnitState::BindingType  bindigType)
virtual

Set texture unit binding type.

Reimplemented in Ogre::D3D11RenderSystem.

◆ _setComputePso()

virtual void Ogre::RenderSystem::_setComputePso ( const HlmsComputePso pso)
pure virtual

Unlike _setPipelineStateObject, the RenderSystem will check if the PSO has changed to avoid redundant state changes (since it's hard to do it at Hlms level)

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _setCurrentDeviceFromTexture()

virtual void Ogre::RenderSystem::_setCurrentDeviceFromTexture ( TextureGpu texture)
pure virtual

Because Ogre doesn't (yet) have the notion of a 'device' or 'GL context', this function lets Ogre know which device should be used by providing a texture.

Parameters
textureCannot be null.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.

◆ _setGeometryTexture()

virtual void Ogre::RenderSystem::_setGeometryTexture ( size_t  unit,
TextureGpu tex 
)
virtual

◆ _setHlmsSamplerblock()

virtual void Ogre::RenderSystem::_setHlmsSamplerblock ( uint8  texUnit,
const HlmsSamplerblock Samplerblock 
)
pure virtual

See HlmsSamplerblock.

This function MUST be called after _setTexture, not before. Otherwise not all APIs may see the change.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _setIndirectBuffer()

virtual void Ogre::RenderSystem::_setIndirectBuffer ( IndirectBufferPacked indirectBuffer)
pure virtual

◆ _setPipelineStateObject()

virtual void Ogre::RenderSystem::_setPipelineStateObject ( const HlmsPso pso)
virtual

◆ _setPointParameters()

virtual void Ogre::RenderSystem::_setPointParameters ( Real  size,
bool  attenuationEnabled,
Real  constant,
Real  linear,
Real  quadratic,
Real  minSize,
Real  maxSize 
)
pure virtual

Sets the size of points and how they are attenuated with distance.

Remarks
When performing point rendering or point sprite rendering, point size can be attenuated with distance. The equation for doing this is attenuation = 1 / (constant + linear * dist + quadratic * d^2) .
For example, to disable distance attenuation (constant screensize) you would set constant to 1, and linear and quadratic to 0. A standard perspective attenuation would be 0, 1, 0 respectively.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _setPointSpritesEnabled()

virtual void Ogre::RenderSystem::_setPointSpritesEnabled ( bool  enabled)
pure virtual

Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points.

Parameters
enabledTrue enables point sprites, false returns to normal point rendering.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _setProjectionMatrix()

virtual void Ogre::RenderSystem::_setProjectionMatrix ( const Matrix4 m)
pure virtual

◆ _setRenderOperation()

virtual void Ogre::RenderSystem::_setRenderOperation ( const v1::CbRenderOp cmd)
pure virtual

◆ _setSamplers()

virtual void Ogre::RenderSystem::_setSamplers ( uint32  slotStart,
const DescriptorSetSampler set 
)
pure virtual

◆ _setSamplersCS()

virtual void Ogre::RenderSystem::_setSamplersCS ( uint32  slotStart,
const DescriptorSetSampler set 
)
pure virtual

◆ _setSurfaceParams()

virtual void Ogre::RenderSystem::_setSurfaceParams ( const ColourValue ambient,
const ColourValue diffuse,
const ColourValue specular,
const ColourValue emissive,
Real  shininess,
TrackVertexColourType  tracking = TVC_NONE 
)
pure virtual

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.

Parameters
ambientThe amount of ambient (sourceless and directionless) light an object reflects. Affected by the colour/amount of ambient light in the scene.
diffuseThe amount of light from directed sources that is reflected (affected by colour/amount of point, directed and spot light sources)
specularThe amount of specular light reflected. This is also affected by directed light sources but represents the colour at the highlights of the object.
emissiveThe colour of light emitted from the object. Note that this will make an object seem brighter and not dependent on lights in the scene, but it will not act as a light, so will not illuminate other objects. Use a light attached to the same SceneNode as the object for this purpose.
shininessA value which only has an effect on specular highlights (so specular must be non-black). The higher this value, the smaller and crisper the specular highlights will be, imitating a more highly polished surface. This value is not constrained to 0.0-1.0, in fact it is likely to be more (10.0 gives a modest sheen to an object).
trackingA bit field that describes which of the ambient, diffuse, specular and emissive colours follow the vertex colour of the primitive. When a bit in this field is set its ColourValue is ignored. This is a combination of TVC_AMBIENT, TVC_DIFFUSE, TVC_SPECULAR(note that the shininess value is still taken from shininess) and TVC_EMISSIVE. TVC_NONE means that there will be no material property tracking the vertex colours.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _setTessellationDomainTexture()

virtual void Ogre::RenderSystem::_setTessellationDomainTexture ( size_t  unit,
TextureGpu tex 
)
virtual

◆ _setTessellationHullTexture()

virtual void Ogre::RenderSystem::_setTessellationHullTexture ( size_t  unit,
TextureGpu tex 
)
virtual

◆ _setTexture()

virtual void Ogre::RenderSystem::_setTexture ( size_t  unit,
TextureGpu texPtr,
bool  bDepthReadOnly 
)
pure virtual

Sets the texture to bind to a given texture unit.

User processes would not normally call this direct unless rendering primitives themselves.

Parameters
unitThe index of the texture unit to modify. Multitexturing hardware can support multiple units (see RenderSystemCapabilites::getNumTextureUnits)
enabledBoolean to turn the unit on/off
texPtrPointer to the texture to use.
bDepthReadOnlytrue if the texture is also attached as a depth buffer but is read only

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GL3PlusRenderSystem.

◆ _setTextureBlendMode()

virtual void Ogre::RenderSystem::_setTextureBlendMode ( size_t  unit,
const LayerBlendModeEx bm 
)
pure virtual

Sets the texture blend modes from a TextureUnitState record.

Meant for use internally only - apps should use the Material and TextureUnitState classes.

Parameters
unitTexture unit as above
bmDetails of the blending mode

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::D3D11RenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.

◆ _setTextureCoordCalculation()

virtual void Ogre::RenderSystem::_setTextureCoordCalculation ( size_t  unit,
TexCoordCalcMethod  m,
const Frustum frustum = 0 
)
pure virtual

Sets a method for automatically calculating texture coordinates for a stage.

Should not be used by apps - for use by Ogre only.

Parameters
unitTexture unit as above
mCalculation method to use
frustumOptional Frustum param, only used for projective effects

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::D3D11RenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.

◆ _setTextureMatrix()

virtual void Ogre::RenderSystem::_setTextureMatrix ( size_t  unit,
const Matrix4 xform 
)
pure virtual

Sets the texture coordinate transformation matrix for a texture unit.

Parameters
unitTexture unit to affect
xformThe 4x4 matrix

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::D3D11RenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.

◆ _setTextureProjectionRelativeTo()

virtual void Ogre::RenderSystem::_setTextureProjectionRelativeTo ( bool  enabled,
const Vector3 pos 
)
virtual

Notify the rendersystem that it should adjust texture projection to be relative to a different origin.

◆ _setTextures() [1/2]

virtual void Ogre::RenderSystem::_setTextures ( uint32  slotStart,
const DescriptorSetTexture set,
uint32  hazardousTexIdx 
)
pure virtual
Parameters
slotStart
set
hazardousTexIdxWhen hazardousTexIdx < set->mTextures.size(); it means that we need to check if set->mTextures[hazardousTexIdx] is not the same as the currently bound RTT.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.

◆ _setTextures() [2/2]

virtual void Ogre::RenderSystem::_setTextures ( uint32  slotStart,
const DescriptorSetTexture2 set 
)
pure virtual

◆ _setTexturesCS() [1/2]

virtual void Ogre::RenderSystem::_setTexturesCS ( uint32  slotStart,
const DescriptorSetTexture set 
)
pure virtual

◆ _setTexturesCS() [2/2]

virtual void Ogre::RenderSystem::_setTexturesCS ( uint32  slotStart,
const DescriptorSetTexture2 set 
)
pure virtual

◆ _setTextureUnitSettings()

virtual void Ogre::RenderSystem::_setTextureUnitSettings ( size_t  texUnit,
TextureUnitState tl 
)
virtual

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.

◆ _setUavCS()

virtual void Ogre::RenderSystem::_setUavCS ( uint32  slotStart,
const DescriptorSetUav set 
)
pure virtual

◆ _setVertexArrayObject()

virtual void Ogre::RenderSystem::_setVertexArrayObject ( const VertexArrayObject vao)
pure virtual

Part of the low level rendering interface.

Tells the RS which VAO will be bound now. (i.e. Vertex Formats, buffers being bound, etc.) You don't need to rebind if the VAO's mRenderQueueId is the same as previous call.

Remarks
Assumes _setPipelineStateObject has already been called.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ _setVertexTexture()

virtual void Ogre::RenderSystem::_setVertexTexture ( size_t  unit,
TextureGpu tex 
)
virtual

Binds a texture to a vertex, geometry, compute, tessellation hull or tessellation domain sampler.

Remarks
Not all rendersystems support separate vertex samplers. For those that do, you can set a texture for them, separate to the regular texture samplers, using this method. For those that don't, you should use the regular texture samplers which are shared between the vertex and fragment units; calling this method will throw an exception.
See also
RenderSystemCapabilites::getVertexTextureUnitsShared

Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.

◆ _setViewMatrix()

virtual void Ogre::RenderSystem::_setViewMatrix ( const Matrix4 m)
pure virtual

◆ _setWorldMatrices()

virtual void Ogre::RenderSystem::_setWorldMatrices ( const Matrix4 m,
unsigned short  count 
)
virtual

Sets multiple world matrices (vertex blending).

◆ _setWorldMatrix()

virtual void Ogre::RenderSystem::_setWorldMatrix ( const Matrix4 m)
pure virtual

◆ _startLegacyV1Rendering()

virtual void Ogre::RenderSystem::_startLegacyV1Rendering ( )
inlinevirtual

May override the current VertexArrayObject!

Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.

◆ _update()

void Ogre::RenderSystem::_update ( )

Called once per frame, regardless of how many active workspaces there are.

◆ _useLights()

virtual void Ogre::RenderSystem::_useLights ( const LightList lights,
unsigned short  limit 
)
pure virtual

Tells the rendersystem to use the attached set of lights (and no others) up to the number specified (this allows the same list to be used with different count limits)

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::D3D11RenderSystem, Ogre::GLES2RenderSystem, and Ogre::GL3PlusRenderSystem.

◆ addClipPlane() [1/2]

virtual void Ogre::RenderSystem::addClipPlane ( const Plane p)
virtual

Add a user clipping plane.

◆ addClipPlane() [2/2]

virtual void Ogre::RenderSystem::addClipPlane ( Real  A,
Real  B,
Real  C,
Real  D 
)
virtual

Add a user clipping plane.

◆ addListener()

virtual void Ogre::RenderSystem::addListener ( Listener l)
virtual

Adds a listener to the custom events that this render system can raise.

Remarks
Some render systems have quite specific, internally generated events that the application may wish to be notified of. Many applications don't have to worry about these events, and can just trust OGRE to handle them, but if you want to know, you can add a listener here.
Events are raised very generically by string name. Perhaps the most common example of a render system specific event is the loss and restoration of a device in DirectX; which OGRE deals with, but you may wish to know when it happens.
See also
RenderSystem::getRenderSystemEvents

◆ addSharedListener()

static void Ogre::RenderSystem::addSharedListener ( Listener listener)
static

Sets shared listener.

Remarks
Shared listener could be set even if no render system is selected yet. This listener will receive "RenderSystemChanged" event on each Root::setRenderSystem call.

◆ areFixedFunctionLightsInViewSpace()

virtual bool Ogre::RenderSystem::areFixedFunctionLightsInViewSpace ( ) const
inlinevirtual

Are fixed-function lights provided in view space? Affects optimisation.

Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.

◆ beginGPUSampleProfile()

virtual void Ogre::RenderSystem::beginGPUSampleProfile ( const String name,
uint32 hashCache 
)
pure virtual

◆ beginProfileEvent()

virtual void Ogre::RenderSystem::beginProfileEvent ( const String eventName)
pure virtual

◆ beginRenderPassDescriptor()

virtual void Ogre::RenderSystem::beginRenderPassDescriptor ( RenderPassDescriptor desc,
TextureGpu anyTarget,
uint8  mipLevel,
const Vector4 viewportSizes,
const Vector4 scissors,
uint32  numViewports,
bool  overlaysEnabled,
bool  warnIfRtvWasFlushed 
)
virtual

When the descriptor is set to Load clear, two possible things may happen:

  1. The region is cleared.
  2. The whole texture is cleared. What actually happens is undefined (depends on the API). But calling "beginRenderPassDescriptor( desc, viewportSettings );" with the same descriptor but different viewports (without changing the desc) guarantees that each region is cleared:
  1. Each time the subregion is switched
  2. Only once (the whole texture), when the first viewport was set.
    When switching between render targets, two beginRenderPassDescriptor in a row automatically implies calls endRenderPassDescriptor. In fact this is faster to perfom than calling beginRenderPassDescriptor - endRenderPassDescriptor in pairs, because we can smartly flush only what needs to be flushed. endRenderPassDescriptor only needs to be called when no other beginRenderPassDescriptor will follow (i.e. at the end of the frame or when starting compute jobs)
    Parameters
    desc
    anyTargetContains the first valid texture in mRenderPassDesc, to be used for reference (e.g. width, height, etc). Could be colour, depth, stencil, or nullptr.
    mipLevelMip at which anyTarget is bound
    viewportSize
    warnIfRtvWasFlushedSee CompositorPassDef::mWarnIfRtvWasFlushed

Reimplemented in Ogre::VulkanRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.

◆ bindGpuProgramParameters()

virtual void Ogre::RenderSystem::bindGpuProgramParameters ( GpuProgramType  gptype,
GpuProgramParametersSharedPtr  params,
uint16  variabilityMask 
)
pure virtual

Bind Gpu program parameters.

Parameters
gptypeThe type of program to bind the parameters to
paramsThe parameters to bind
variabilityMaskA mask of GpuParamVariability identifying which params need binding

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ bindGpuProgramPassIterationParameters()

virtual void Ogre::RenderSystem::bindGpuProgramPassIterationParameters ( GpuProgramType  gptype)
pure virtual

Only binds Gpu program parameters used for passes that have more than one iteration rendering.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ checkExtension()

virtual bool Ogre::RenderSystem::checkExtension ( const String ext) const
inlinevirtual

Checks for the presense of an API-specific extension (eg. Vulkan, GL)

Reimplemented in Ogre::GLES2RenderSystem.

◆ clearFrameBuffer()

virtual void Ogre::RenderSystem::clearFrameBuffer ( RenderPassDescriptor renderPassDesc,
TextureGpu anyTarget,
uint8  mipLevel 
)
pure virtual

Immediately clears the whole frame buffer on the selected RenderPassDescriptor.

Prefer clearing using the LoadAction semantics in the RenderPassDescriptor. This function is provided for two reasons:

  1. Backwards compatibility (i.e. easier porting from 2.1)
  2. Non-tilers desktop GPUs may be faster to clear the whole framebuffer at once.
    Remarks
    Will break an existing RenderPassDescriptor set via beginRenderPassDescriptor.
    Parameters
    renderPassDescRenderPassDescriptor filled with LoadActions set to clear and StoreActions set to Store.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.

◆ compositorWorkspaceBegin()

virtual void Ogre::RenderSystem::compositorWorkspaceBegin ( CompositorWorkspace workspace,
const bool  forceBeginFrame 
)
virtual

◆ compositorWorkspaceEnd()

virtual void Ogre::RenderSystem::compositorWorkspaceEnd ( CompositorWorkspace workspace,
const bool  forceEndFrame 
)
virtual

◆ compositorWorkspaceUpdate()

virtual void Ogre::RenderSystem::compositorWorkspaceUpdate ( CompositorWorkspace workspace)
virtual

◆ convertColourValue()

virtual void Ogre::RenderSystem::convertColourValue ( const ColourValue colour,
uint32 pDest 
)
virtual

Generates a packed data version of the passed in ColourValue suitable for use as with this RenderSystem.

Remarks
Since different render systems have different colour data formats (eg RGBA for GL, ARGB for D3D) this method allows you to use 1 method for all.
Parameters
colourThe colour to convert
pDestPointer to location to put the result.

◆ createHardwareOcclusionQuery()

virtual HardwareOcclusionQuery* Ogre::RenderSystem::createHardwareOcclusionQuery ( )
pure virtual

◆ createRenderPassDescriptor()

virtual RenderPassDescriptor* Ogre::RenderSystem::createRenderPassDescriptor ( )
pure virtual

◆ createRenderSystemCapabilities()

virtual RenderSystemCapabilities* Ogre::RenderSystem::createRenderSystemCapabilities ( ) const
pure virtual

Query the real capabilities of the GPU and driver in the RenderSystem.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.

◆ debugAnnotationPop()

virtual void Ogre::RenderSystem::debugAnnotationPop ( )
inlinevirtual

◆ debugAnnotationPush()

virtual void Ogre::RenderSystem::debugAnnotationPush ( const String event)
inlinevirtual

Specifically meant to mark passes in RenderDoc.

See https://renderdoc.org/docs/how/how_annotate_capture.html

In many cases it will use the same interface as beginProfileEvent / endProfileEvent

Note: For security & performance reasons this feature is only enabled when OGRE_DEBUG_MODE >= OGRE_DEBUG_MEDIUM

Reimplemented in Ogre::VulkanRenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.

◆ deinitGPUProfiling()

virtual void Ogre::RenderSystem::deinitGPUProfiling ( )
pure virtual

◆ destroyHardwareOcclusionQuery()

virtual void Ogre::RenderSystem::destroyHardwareOcclusionQuery ( HardwareOcclusionQuery hq)
virtual

Destroy a hardware occlusion query object.

◆ destroyRenderPassDescriptor()

void Ogre::RenderSystem::destroyRenderPassDescriptor ( RenderPassDescriptor renderPassDesc)

◆ destroyRenderWindow()

virtual void Ogre::RenderSystem::destroyRenderWindow ( Window window)
virtual

Destroys a render window.

◆ endCopyEncoder()

virtual void Ogre::RenderSystem::endCopyEncoder ( )
inlinevirtual

Required when caller will soon start analyzing barriers (e.g.

use BarrierSolver) Ogre will flush any pending resource transitions.

Otherwise BarrierSolver will see that a Resource is in a particular state or layout, then when calling executeResourceTransition, the pending resource layout will be flushed, and now the resource transition resolved by BarrierSolver will have the wrong 'old' layout

Reimplemented in Ogre::VulkanRenderSystem.

◆ endGpuDebuggerFrameCapture()

virtual void Ogre::RenderSystem::endGpuDebuggerFrameCapture ( Window window,
const bool  bDiscard = false 
)
virtual

See RenderSystem::startGpuDebuggerFrameCapture Call this function when you're done capturing a frame.

Reimplemented in Ogre::VulkanRenderSystem.

◆ endGPUSampleProfile()

virtual void Ogre::RenderSystem::endGPUSampleProfile ( const String name)
pure virtual

◆ endProfileEvent()

virtual void Ogre::RenderSystem::endProfileEvent ( )
pure virtual

◆ endRenderPassDescriptor()

virtual void Ogre::RenderSystem::endRenderPassDescriptor ( )
virtual

◆ executeRenderPassDescriptorDelayedActions()

virtual void Ogre::RenderSystem::executeRenderPassDescriptorDelayedActions ( )
virtual

Metal needs to delay RenderCommand creation to the last minute, because we can't issue blit operations (e.g.

buffer copies) which a lot of v1 code relies on otherwise the RenderCommand gets canceled. Even if we were to get rid of v1 operations, the user may want to hook listeners for _renderPhase02 and perform forbidden operations. Therefore it's easier to split the process done in beginRenderPassDescriptor in two steps (beginRenderPassDescriptor and executeRenderPassDescriptorDelayedActions) for Metal.

Reimplemented in Ogre::VulkanRenderSystem, and Ogre::MetalRenderSystem.

◆ executeResourceTransition()

virtual void Ogre::RenderSystem::executeResourceTransition ( const ResourceTransitionArray rstCollection)
inlinevirtual

◆ fireSharedEvent()

static void Ogre::RenderSystem::fireSharedEvent ( const String name,
const NameValuePairList params = 0 
)
static

◆ flushCommands()

virtual void Ogre::RenderSystem::flushCommands ( )
pure virtual

◆ getBarrierSolver()

BarrierSolver& Ogre::RenderSystem::getBarrierSolver ( )
inline

◆ getBoundUav()

BoundUav Ogre::RenderSystem::getBoundUav ( size_t  slot) const

◆ getCapabilities()

const RenderSystemCapabilities* Ogre::RenderSystem::getCapabilities ( ) const
inline

Gets the capabilities of the render system.

◆ getColourVertexElementType()

virtual VertexElementType Ogre::RenderSystem::getColourVertexElementType ( ) const
pure virtual

Get the native VertexElementType for a compact 32-bit colour value for this rendersystem.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ getConfigOptions()

virtual ConfigOptionMap& Ogre::RenderSystem::getConfigOptions ( )
pure virtual

Returns the details of this API's configuration options.

Remarks
Each render system must be able to inform the world of what options must/can be specified for it's operation.
These are passed as strings for portability, but grouped into a structure (_ConfigOption) which includes both options and current value.
Note that the settings returned from this call are affected by the options that have been set so far, since some options are interdependent.
This routine is called automatically by the default configuration dialogue produced by Root::showConfigDialog or may be used by the caller for custom settings dialogs
Returns
A 'map' of options, i.e. a list of options which is also indexed by option name.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ getCurrentPassDescriptor()

RenderPassDescriptor* Ogre::RenderSystem::getCurrentPassDescriptor ( )
inline

◆ getCurrentRenderViewports()

Viewport* Ogre::RenderSystem::getCurrentRenderViewports ( )
inline

◆ getCustomAttribute()

virtual void Ogre::RenderSystem::getCustomAttribute ( const String name,
void *  pData 
)
virtual

Gets a custom (maybe platform-specific) attribute.

Remarks
This is a nasty way of satisfying any API's need to see platform-specific details.
Parameters
nameThe name of the attribute.
pDataPointer to memory of the right kind of structure to receive the info.

Reimplemented in Ogre::VulkanRenderSystem, and Ogre::D3D11RenderSystem.

◆ getDebugShaders()

bool Ogre::RenderSystem::getDebugShaders ( ) const
inline

◆ getDepthBufferFor()

virtual TextureGpu* Ogre::RenderSystem::getDepthBufferFor ( TextureGpu colourTexture,
uint16  poolId,
bool  preferDepthTexture,
PixelFormatGpu  depthBufferFormat 
)
virtual

◆ getDisplayMonitorCount()

virtual unsigned int Ogre::RenderSystem::getDisplayMonitorCount ( ) const
pure virtual

◆ getDriverVersion()

virtual const DriverVersion& Ogre::RenderSystem::getDriverVersion ( ) const
inlinevirtual

Returns the driver version.

◆ getErrorDescription()

virtual String Ogre::RenderSystem::getErrorDescription ( long  errorNumber) const
pure virtual

◆ getFriendlyName()

virtual const String& Ogre::RenderSystem::getFriendlyName ( ) const
pure virtual

◆ getGlobalInstanceVertexBuffer()

v1::HardwareVertexBufferSharedPtr Ogre::RenderSystem::getGlobalInstanceVertexBuffer ( ) const

Returns the global instance vertex buffer.

◆ getGlobalInstanceVertexBufferVertexDeclaration()

v1::VertexDeclaration* Ogre::RenderSystem::getGlobalInstanceVertexBufferVertexDeclaration ( ) const

Gets vertex declaration for the global vertex buffer for the global instancing.

◆ getGlobalNumberOfInstances()

size_t Ogre::RenderSystem::getGlobalNumberOfInstances ( ) const

Gets the global number of instances.

◆ getHorizontalTexelOffset()

virtual Real Ogre::RenderSystem::getHorizontalTexelOffset ( )
pure virtual

Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this rendersystem.

Remarks
Since rendersystems sometimes disagree on the origin of a texel, mapping from texels to pixels can sometimes be problematic to implement generically. This method allows you to retrieve the offset required to map the origin of a texel to the origin of a pixel in the horizontal direction.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ getInvertedClipSpaceY()

bool Ogre::RenderSystem::getInvertedClipSpaceY ( ) const
inline

+Y is downwards in NDC (Normalized Device Coordinates). Only Vulkan has this problem.

◆ getInvertVertexWinding()

virtual bool Ogre::RenderSystem::getInvertVertexWinding ( ) const
virtual

Indicates whether or not the vertex windings set will be inverted for the current render (e.g.

reflections)

See also
RenderSystem::setInvertVertexWinding

◆ getMaxBoundViewports()

uint32 Ogre::RenderSystem::getMaxBoundViewports ( )
inline

◆ getMaximumDepthInputValue()

virtual Real Ogre::RenderSystem::getMaximumDepthInputValue ( )
pure virtual

Gets the maximum (farthest) depth value to be used when rendering using identity transforms.

Remarks
When using identity transforms you can manually set the depth of a vertex; however the input values required differ per rendersystem. This method lets you retrieve the correct value.
See also
Renderable::getUseIdentityView, Renderable::getUseIdentityProjection

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ getMetrics()

const RenderingMetrics& Ogre::RenderSystem::getMetrics ( ) const

◆ getMinimumDepthInputValue()

virtual Real Ogre::RenderSystem::getMinimumDepthInputValue ( )
pure virtual

Gets the minimum (closest) depth value to be used when rendering using identity transforms.

Remarks
When using identity transforms you can manually set the depth of a vertex; however the input values required differ per rendersystem. This method lets you retrieve the correct value.
See also
Renderable::getUseIdentityView, Renderable::getUseIdentityProjection

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ getMutableCapabilities()

RenderSystemCapabilities* Ogre::RenderSystem::getMutableCapabilities ( )
inline

Get a pointer to the current capabilities being used by the RenderSystem.

Remarks
The capabilities may be modified using this pointer, this will only have an effect before the RenderSystem has been initialised. It's intended use is to allow a listener of the RenderSystemCapabilitiesCreated event to customise the capabilities on the fly before the RenderSystem is initialised.

◆ getName()

virtual const String& Ogre::RenderSystem::getName ( ) const
pure virtual

◆ getNativeShadingLanguageVersion()

uint16 Ogre::RenderSystem::getNativeShadingLanguageVersion ( ) const
inline

Gets the native shading language version for this render system.

Formatted so that it can be used within a shading program. For example, OpenGL 3.2 would return 150, while 3.3 would return 330

◆ getNumPriorityConfigOptions()

virtual size_t Ogre::RenderSystem::getNumPriorityConfigOptions ( ) const
virtual

Number of priority config options in RenderSystem::getPriorityConfigOption.

Remarks
IMPORTANT: The return value can change after calls to setConfigOption, it can even return higher or lower values than before.

Therefore a proper loop would call getNumPriorityConfigOptions on every iteration:

// GOOD:
for( size_t i=0; i < rs->getNumPriorityConfigOptions(); ++i )
rs->setConfigOption( rs->getPriorityConfigOption( i ), value );
// BAD:
const size_t cachedNumOptions = rs->getNumPriorityConfigOptions();
for( size_t i=0; i < cachedNumOptions; ++i )
rs->setConfigOption( rs->getPriorityConfigOption( i ), value );

Reimplemented in Ogre::VulkanRenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.

◆ getPixelFormatToShaderType()

virtual const PixelFormatToShaderType* Ogre::RenderSystem::getPixelFormatToShaderType ( ) const
pure virtual

◆ getPriorityConfigOption()

virtual const char* Ogre::RenderSystem::getPriorityConfigOption ( size_t  idx) const
virtual

Some options depend on other options.

Therefore it's best to call RenderSystem::setConfigOption in order

Parameters
idxValue must be in range [0; getNumPriorityConfigOptions)

Options must be set in ascending order, i.e. idx = 0 must be called before idx = 1

Returns
The name to use in setConfigOption( name, value )

Reimplemented in Ogre::VulkanRenderSystem, Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.

◆ getRenderDocApi()

RENDERDOC_API_1_4_1* Ogre::RenderSystem::getRenderDocApi ( )
inline

Returns the RenderDoc API handle in case you want to do more advanced functionality than what we expose.

Note we may return nullptr if RenderDoc was not yet loaded.

Call RenderSystem::loadRenderDocApi first if you wish the returned ptr to not be null (it may still be null if we fail to load RenderDoc)

◆ getRenderSystemEvents()

virtual const StringVector& Ogre::RenderSystem::getRenderSystemEvents ( ) const
inlinevirtual

Gets a list of the rendersystem specific events that this rendersystem can raise.

See also
RenderSystem::addListener

◆ getRSDepthRange()

virtual Real Ogre::RenderSystem::getRSDepthRange ( ) const
inlinevirtual

OpenGL depth is in range [-1;1] so it returns 2.0f; D3D11 & Metal are in range [0;1] so it returns 1.0f;.

Note OpenGL may behave like D3D11, and thus we'll return 1.0f too. This is decided at runtime, not at compile time.

Reimplemented in Ogre::GL3PlusRenderSystem.

◆ getStencilBufferParams()

const StencilParams& Ogre::RenderSystem::getStencilBufferParams ( ) const
inline

◆ getTextureGpuManager()

TextureGpuManager* Ogre::RenderSystem::getTextureGpuManager ( ) const
inline

◆ getVaoManager()

VaoManager* Ogre::RenderSystem::getVaoManager ( ) const
inline

◆ getVerticalTexelOffset()

virtual Real Ogre::RenderSystem::getVerticalTexelOffset ( )
pure virtual

Returns the vertical texel offset value required for mapping texel origins to pixel origins in this rendersystem.

Remarks
Since rendersystems sometimes disagree on the origin of a texel, mapping from texels to pixels can sometimes be problematic to implement generically. This method allows you to retrieve the offset required to map the origin of a texel to the origin of a pixel in the vertical direction.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ getWBufferEnabled()

bool Ogre::RenderSystem::getWBufferEnabled ( ) const

Returns true if the renderer will try to use W-buffers when available.

◆ hasAnisotropicMipMapFilter()

virtual bool Ogre::RenderSystem::hasAnisotropicMipMapFilter ( ) const
pure virtual

Determines if the system has anisotropic mip map filter support.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ initGPUProfiling()

virtual void Ogre::RenderSystem::initGPUProfiling ( )
pure virtual

◆ isGpuProgramBound()

virtual bool Ogre::RenderSystem::isGpuProgramBound ( GpuProgramType  gptype)
virtual

Returns whether or not a Gpu program of the given type is currently bound.

◆ isReverseDepth()

bool Ogre::RenderSystem::isReverseDepth ( ) const
inline

◆ isSameLayout()

virtual bool Ogre::RenderSystem::isSameLayout ( ResourceLayout::Layout  a,
ResourceLayout::Layout  b,
const TextureGpu texture,
bool  bIsDebugCheck 
) const
virtual

Returns true if 'a' and 'b' internally map to the same layout and should be considered equivalent for a given texture.

Parameters
bIsDebugCheckWhen true, we're calling this as a consistency check (e.g. asserts if layouts changed externally outside the BarrierSolver). Non-explicit APIs may return too many false negatives triggering the assert, thus this flag prevents false crashes

Reimplemented in Ogre::VulkanRenderSystem.

◆ isStaticBufferLockable()

virtual bool Ogre::RenderSystem::isStaticBufferLockable ( ) const
inlinevirtual

◆ loadRenderDocApi()

bool Ogre::RenderSystem::loadRenderDocApi ( )

Explicitly loads RenderDoc.

It is not necessary to call this function unless you want to use RenderSystem::getRenderDocApi before we are required to load RenderDoc.

◆ markProfileEvent()

virtual void Ogre::RenderSystem::markProfileEvent ( const String event)
pure virtual

Marks an instantaneous event for graphics profilers.

This is equivalent to calling beginProfileEvent() and endProfileEvent() back to back.

Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::GLES2RenderSystem, Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, and Ogre::MetalRenderSystem.

◆ postExtraThreadsStarted()

virtual void Ogre::RenderSystem::postExtraThreadsStarted ( )
pure virtual

◆ preExtraThreadsStarted()

virtual void Ogre::RenderSystem::preExtraThreadsStarted ( )
pure virtual

Tell the rendersystem to perform any prep tasks it needs to directly before other threads which might access the rendering API are registered.

Remarks
Call this from your main thread before starting your other threads (which themselves should call registerThread()). Note that if you start your own threads, there is a specific startup sequence which must be respected and requires synchronisation between the threads:
  1. [Main thread]Call preExtraThreadsStarted
  2. [Main thread]Start other thread, wait
  3. [Other thread]Call registerThread, notify main thread & continue
  4. [Main thread]Wake up & call postExtraThreadsStarted
Once this init sequence is completed the threads are independent but this startup sequence must be respected.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ queueBindUAVs()

void Ogre::RenderSystem::queueBindUAVs ( const DescriptorSetUav descSetUav)

Queues the binding of an UAV to the binding point/slot.

It won't actually take effect until you flush the UAVs or set another RTT.

Remarks
Internal Developer Notes: D3D11 keeps UAVs that affect rendering separate from UAVs that affect Compute Shaders. Hence queueBindUAVs & _setTextureCS are independent.

OpenGL however, does not make this distinction. Hence once we switch back to 3D rendering, we need to restore UAVs set via queueBindUAV.

◆ registerThread()

virtual void Ogre::RenderSystem::registerThread ( )
pure virtual

Register the an additional thread which may make calls to rendersystem-related objects.

Remarks
This method should only be called by additional threads during their initialisation. If they intend to use hardware rendering system resources they should call this method before doing anything related to the render system. Some rendering APIs require a per-thread setup and this method will sort that out. It is also necessary to call unregisterThread before the thread shuts down.
Note
This method takes no parameters - it must be called from the thread being registered and that context is enough.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ reinitialise()

virtual void Ogre::RenderSystem::reinitialise ( )
pure virtual

Restart the renderer (normally following a change in settings).

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ removeListener()

virtual void Ogre::RenderSystem::removeListener ( Listener l)
virtual

Remove a listener to the custom events that this render system can raise.

◆ removeSharedListener()

static void Ogre::RenderSystem::removeSharedListener ( Listener listener)
static

Remove shared listener to the custom events that this render system can raise.

◆ resetClipPlanes()

virtual void Ogre::RenderSystem::resetClipPlanes ( )
virtual

Clears the user clipping region.

◆ reverseCompareFunction()

static CompareFunction Ogre::RenderSystem::reverseCompareFunction ( CompareFunction  depthFunc)
static

Reverts the compare order e.g.

greater_equal becomes less_equal Used by reverse depth

Parameters
depthFunc
Returns

◆ setClipPlanes()

virtual void Ogre::RenderSystem::setClipPlanes ( const PlaneList clipPlanes)
virtual

Sets the user clipping region.

◆ setConfigOption()

virtual void Ogre::RenderSystem::setConfigOption ( const String name,
const String value 
)
pure virtual

Sets an option for this API.

Remarks
Used to confirm the settings (normally chosen by the user) in order to make the renderer able to initialise with the settings as required. This may be video mode, D3D driver, full screen / windowed etc. Called automatically by the default configuration dialog, and by the restoration of saved settings. These settings are stored and only activated when RenderSystem::initialise or RenderSystem::reinitialise are called.
If using a custom configuration dialog, it is advised that the caller calls RenderSystem::getConfigOptions again, since some options can alter resulting from a selection.
Parameters
nameThe name of the option to alter.
valueThe value to set the option to.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ setCurrentPassIterationCount()

virtual void Ogre::RenderSystem::setCurrentPassIterationCount ( const size_t  count)
inlinevirtual

set the current multi pass count value.

This must be set prior to calling _render() if multiple renderings of the same pass state are required.

Parameters
countNumber of times to render the current state.

◆ setDebugShaders()

void Ogre::RenderSystem::setDebugShaders ( bool  bDebugShaders)

Instructs the RenderSystem to compile shaders without optimizations and with debug information, for easier debugging on APIs that support it.

Default is true if OGRE_DEBUG_MODE >= OGRE_DEBUG_HIGH, else false

This setting takes effect for shaders compiled afterwards. Already compiled shaders won't change unless you manually rebuild them.

It is highly recommended you disable the Microcode cache before changing the default, or else debug shaders may contaminate your cache, or alternatively a shader from the cache may be used which may have been compiled with a different setting.

◆ setDeriveDepthBias()

virtual void Ogre::RenderSystem::setDeriveDepthBias ( bool  derive,
float  baseValue = 0.0f,
float  multiplier = 0.0f,
float  slopeScale = 0.0f 
)
inlinevirtual

Tell the render system whether to derive a depth bias on its own based on the values passed to it in setCurrentPassIterationCount.

The depth bias set will be baseValue + iteration * multiplier

Parameters
deriveTrue to tell the RS to derive this automatically
baseValueThe base value to which the multiplier should be added
multiplierThe amount of depth bias to apply per iteration
slopeScaleThe constant slope scale bias for completeness

◆ setDrawBuffer()

virtual bool Ogre::RenderSystem::setDrawBuffer ( ColourBufferType  colourBuffer)
inlinevirtual

Sets the colour buffer that the render system will to draw.

If the render system implementation or configuration does not support a particular value, then false will be returned and the current colour buffer value will not be modified.

Parameters
colourBufferSpecifies the colour buffer that will be drawn into.

Reimplemented in Ogre::D3D11RenderSystem.

◆ setGlobalInstanceVertexBuffer()

void Ogre::RenderSystem::setGlobalInstanceVertexBuffer ( const v1::HardwareVertexBufferSharedPtr val)

Sets the global instance vertex buffer.

◆ setGlobalInstanceVertexBufferVertexDeclaration()

void Ogre::RenderSystem::setGlobalInstanceVertexBufferVertexDeclaration ( v1::VertexDeclaration val)

Sets vertex declaration for the global vertex buffer for the global instancing.

◆ setGlobalNumberOfInstances()

void Ogre::RenderSystem::setGlobalNumberOfInstances ( const size_t  val)

Sets the global number of instances.

◆ setInvertVertexWinding()

void Ogre::RenderSystem::setInvertVertexWinding ( bool  invert)

Sets whether or not vertex windings set should be inverted; this can be important for rendering reflections.

◆ setMetricsRecordingEnabled()

void Ogre::RenderSystem::setMetricsRecordingEnabled ( bool  bEnable)

◆ setStencilBufferParams()

virtual void Ogre::RenderSystem::setStencilBufferParams ( uint32  refValue,
const StencilParams stencilParams 
)
virtual

This method allows you to set all the stencil buffer parameters in one call.

Remarks
The stencil buffer is used to mask out pixels in the render target, allowing you to do effects like mirrors, cut-outs, stencil shadows and more. Each of your batches of rendering is likely to ignore the stencil buffer, update it with new values, or apply it to mask the output of the render. The stencil test is:
(Reference Value & Mask) CompareFunction (Stencil Buffer Value & Mask)
The result of this will cause one of 3 actions depending on whether the test fails, succeeds but with the depth buffer check still failing, or succeeds with the depth buffer check passing too.
Unlike other render states, stencilling is left for the application to turn on and off when it requires. This is because you are likely to want to change parameters between batches of arbitrary objects and control the ordering yourself. In order to batch things this way, you'll want to use OGRE's separate render queue groups (see RenderQueue) and register a RenderQueueListener to get notifications between batches.
Parameters
refValueThe reference value used in the comparison (dynamic)
stencilParamsThe static parameters that involve more expensive state changes. Ogre dev implementors note: Should check if the stencilParams are different from before

Reimplemented in Ogre::VulkanRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ setUavStartingSlot()

void Ogre::RenderSystem::setUavStartingSlot ( uint32  startingSlot)

In Direct3D11, UAV & RenderTargets share the same slots.

Because of this, we enforce the same behavior on all RenderSystems. An unfortunate consequence is that if you attach an MRT consisting of 3 RTs; the UAV needs to set at slot 3; not slot 0. This setting lets you tell Ogre the starting slot; so queueBindUAVs( descSet ) goes from slot 3 onwards if you call setUavStartingSlot( 3 )

Ogre will raise an exception in D3D11 if the starting slot is lower than the number of attached RTs, but will let it pass if you're using GL3+ [TODO: Make this behavior consistent?]
Remarks
Will not take effect until the next call to flushUAVs or setting a new RTT.
Parameters
startingSlotDefault value: 1.

◆ setWBufferEnabled()

void Ogre::RenderSystem::setWBufferEnabled ( bool  enabled)

Sets whether or not W-buffers are enabled if they are available for this renderer.

Parameters
enabledIf true and the renderer supports them W-buffers will be used. If false W-buffers will not be used even if available. W-buffers are enabled by default for 16bit depth buffers and disabled for all other depths.

◆ shutdown()

virtual void Ogre::RenderSystem::shutdown ( )
virtual

◆ startGpuDebuggerFrameCapture()

virtual bool Ogre::RenderSystem::startGpuDebuggerFrameCapture ( Window window)
virtual

Programmatically performs a GPU capture when attached to a GPU debugger like RenderDoc or Metal Graphics Debugger.

You must call RenderSystem::endGpuDebuggerFrameCapture

Remarks
Very big captures (e.g. lots of API calls between start/endGpuDebuggerFrameCapture) may result in the system running out of memory.
Parameters
windowCan be NULL for automatic capture.

See pRENDERDOC_StartFrameCapture's documentation

Returns
False if we know for certain we failed to capture (e.g. RenderDoc is not running, we were build without integration support, etc)

True if we believe the frame capture started. Note a capture may still fail regardless due to other more technical reasons, as rendering APIs are complex.

◆ unregisterThread()

virtual void Ogre::RenderSystem::unregisterThread ( )
pure virtual

Unregister an additional thread which may make calls to rendersystem-related objects.

See also
RenderSystem::registerThread

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ updateCompositorManager()

virtual void Ogre::RenderSystem::updateCompositorManager ( CompositorManager2 compositorManager)
virtual

This gives the renderer a chance to perform the compositor update in a special way.

When the render system is ready to perform the actual update it should just compositorManager->_updateImplementation.

Reimplemented in Ogre::MetalRenderSystem.

◆ useCustomRenderSystemCapabilities()

virtual void Ogre::RenderSystem::useCustomRenderSystemCapabilities ( RenderSystemCapabilities capabilities)
virtual

Force the render system to use the special capabilities.

Can only be called before the render system has been fully initializer (before createWindow is called)

Parameters
capabilitieshas to be a subset of the real capabilities and the caller is responsible for deallocating capabilities.

◆ validateConfigOptions()

virtual String Ogre::RenderSystem::validateConfigOptions ( )
pure virtual

Validates the options set for the rendering system, returning a message if there are problems.

Note
If the returned string is empty, there are no problems.

Implemented in Ogre::VulkanRenderSystem, Ogre::NULLRenderSystem, Ogre::MetalRenderSystem, Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::GLES2RenderSystem.

◆ validateDevice()

virtual bool Ogre::RenderSystem::validateDevice ( bool  forceDeviceElection = false)
inlinevirtual

Some render systems have moments when GPU device is temporarily unavailable, for example when D3D11 device is lost, or when iOS app is in background, etc.

Reimplemented in Ogre::D3D11RenderSystem.

◆ validateSampleDescription()

virtual SampleDescription Ogre::RenderSystem::validateSampleDescription ( const SampleDescription sampleDesc,
PixelFormatGpu  format 
)
virtual

Returns supported sample description for requested FSAA mode, with graceful downgrading.

Reimplemented in Ogre::VulkanRenderSystem, Ogre::MetalRenderSystem, and Ogre::D3D11RenderSystem.


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