OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::D3D9RenderSystem Class Referenceabstract

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

#include <OgreD3D9RenderSystem.h>

+ Inheritance diagram for Ogre::D3D9RenderSystem:

Public Types

enum  MultiheadUseType { mutAuto , mutYes , mutNo }
 
typedef MapIterator< Ogre::RenderTargetMapRenderTargetIterator
 Iterator over RenderTargets.
 

Public Member Functions

 D3D9RenderSystem (HINSTANCE hInstance)
 
 ~D3D9RenderSystem ()
 
DepthBuffer_addManualDepthBuffer (IDirect3DDevice9 *depthSurfaceDevice, IDirect3DSurface9 *surf)
 This function is meant to add Depth Buffers to the pool that aren't released when the DepthBuffer is deleted.
 
void _applyObliqueDepthProjection (Matrix4 &matrix, const Plane &plane, bool forGpuProgram)
 Update a perspective projection matrix to use 'oblique depth projection'.
 
void _beginFrame ()
 Signifies the beginning of a frame, i.e.
 
virtual void _beginFrameOnce (void)
 Signifies the beginning of the main frame.
 
virtual void _beginGeometryCount (void)
 The RenderSystem will keep a count of tris rendered, this resets the count.
 
virtual void _bindTextureUavCS (uint32 slot, Texture *texture, ResourceAccess::ResourceAccess access, int32 mipmapLevel, int32 textureArrayIndex, PixelFormat pixelFormat)=0
 Binds an UAV texture to a Compute Shader.
 
bool _checkTextureFilteringSupported (TextureType ttype, PixelFormat format, int usage)
 Check whether or not filtering is supported for the precise texture format requested with the given usage options.
 
void _cleanupDepthBuffers (bool bCleanManualBuffers=true)
 This function does NOT override RenderSystem::_cleanupDepthBuffers(bool) functionality.
 
void _cleanupDepthBuffers (IDirect3DDevice9 *creator)
 
void _cleanupDepthBuffers (IDirect3DSurface9 *manualSurface)
 This function does NOT override RenderSystem::_cleanupDepthBuffers(bool) functionality.
 
void _convertProjectionMatrix (const Matrix4 &matrix, Matrix4 &dest, bool forGpuProgram=false)
 Converts a uniform projection matrix to suitable for this render system.
 
DepthBuffer_createDepthBufferFor (RenderTarget *renderTarget)
 Creates a DepthBuffer that can be attached to the specified RenderTarget.
 
virtual DepthBuffer_createDepthBufferFor (RenderTarget *renderTarget, bool exactMatchFormat)=0
 Creates a DepthBuffer that can be attached to the specified RenderTarget.
 
RenderWindow_createRenderWindow (const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0)
 Creates a new rendering window.
 
bool _createRenderWindows (const RenderWindowDescriptionList &renderWindowDescriptions, RenderWindowList &createdWindows)
 Creates multiple rendering windows.
 
virtual void _destroyDepthBuffer (DepthBuffer *depthBuffer)
 
void _disableTextureUnit (size_t texUnit)
 Turns off a texture unit.
 
virtual void _disableTextureUnitsFrom (size_t texUnit)
 Disables all texture units from the given unit upwards.
 
virtual void _dispatch (const HlmsComputePso &pso)=0
 
void _endFrame ()
 Ends rendering of a frame to the current viewport.
 
virtual void _endFrameOnce (void)
 Called once per frame, regardless of how many active workspaces there are.
 
virtual void _executeResourceTransition (ResourceTransition *resTransition)
 
virtual unsigned int _getBatchCount (void) const
 Reports the number of batches rendered since the last _beginGeometryCount call.
 
virtual const String_getDefaultViewportMaterialScheme (void) const
 Returns the default material scheme used by the render system.
 
D3DFORMAT _getDepthStencilFormatFor (D3DFORMAT fmt)
 Check which depthStencil formats can be used with a certain pixel format, and return the best suited.
 
virtual unsigned int _getFaceCount (void) const
 Reports the number of tris rendered since the last _beginGeometryCount call.
 
virtual unsigned int _getVertexCount (void) const
 Reports the number of vertices passed to the renderer since the last _beginGeometryCount call.
 
virtual Viewport_getViewport (void)
 Get the current active viewport for rendering.
 
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)
 
RenderWindow_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).
 
virtual void _initRenderTargets (void)
 Utility method for initialising all render targets attached to this rendering system.
 
void _makeOrthoMatrix (const Radian &fovy, Real aspect, Real nearPlane, Real farPlane, Matrix4 &dest, bool forGpuProgram=false)
 Builds an orthographic projection matrix suitable for this render system.
 
void _makeProjectionMatrix (const Radian &fovy, Real aspect, Real nearPlane, Real farPlane, Matrix4 &dest, bool forGpuProgram=false)
 Builds a perspective projection matrix suitable for this render system.
 
void _makeProjectionMatrix (Real left, Real right, Real bottom, Real top, Real nearPlane, Real farPlane, Matrix4 &dest, bool forGpuProgram=false)
 Builds a perspective projection matrix for the case when frustum is not centered around camera.
 
virtual void _notifyCompositorNodeSwitchedRenderTarget (RenderTarget *previousTarget)
 This function was created because of Metal.
 
virtual RenderSystemContext_pauseFrame (void)
 Pause rendering for a frame.
 
virtual void _render (const CbDrawCallIndexed *cmd)=0
 Renders the VAO. Assumes _setVertexArrayObject has already been called.
 
virtual void _render (const CbDrawCallStrip *cmd)=0
 
void _render (const RenderOperation &op)
 
virtual void _render (const v1::CbDrawCallIndexed *cmd)=0
 Renders a V1 RenderOperation. Assumes _setRenderOperation has already been called.
 
virtual void _render (const v1::CbDrawCallStrip *cmd)=0
 
virtual void _render (const v1::RenderOperation &op)
 Render something to the active viewport.
 
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)
 
virtual void _renderUsingReadBackAsTexture (unsigned int secondPass, Ogre::String variableName, unsigned int StartSlot)
 
virtual void _resourceTransitionCreated (ResourceTransition *resTransition)
 
virtual void _resourceTransitionDestroyed (ResourceTransition *resTransition)
 
virtual void _resumeFrame (RenderSystemContext *context)
 Resume rendering for a frame.
 
void _setAlphaRejectSettings (CompareFunction func, unsigned char value, bool alphaToCoverage)
 
virtual void _setBindingType (TextureUnitState::BindingType bindigType)
 Set texture unit binding type.
 
void _setColourBufferWriteEnabled (bool red, bool green, bool blue, bool alpha)
 
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)
 
void _setCullingMode (CullingMode mode)
 
void _setDepthBias (float constantBias, float slopeScaleBias)
 
void _setDepthBufferCheckEnabled (bool enabled=true)
 
void _setDepthBufferFunction (CompareFunction func=CMPF_LESS_EQUAL)
 
void _setDepthBufferParams (bool depthTest=true, bool depthWrite=true, CompareFunction depthFunction=CMPF_LESS_EQUAL)
 
void _setDepthBufferWriteEnabled (bool enabled=true)
 
virtual void _setGeometryTexture (size_t unit, const TexturePtr &tex)
 
virtual void _setHlmsBlendblock (const HlmsBlendblock *blendblock)
 
virtual void _setHlmsMacroblock (const HlmsMacroblock *macroblock)
 
virtual void _setHlmsSamplerblock (uint8 texUnit, const HlmsSamplerblock *Samplerblock)=0
 @See HlmsSamplerblock.
 
virtual void _setHlmsSamplerblockCS (uint8 texUnit, const HlmsSamplerblock *Samplerblock)=0
 
virtual void _setIndirectBuffer (IndirectBufferPacked *indirectBuffer)=0
 
virtual void _setPipelineStateObject (const HlmsPso *pso)
 @See HlmsPso
 
void _setPointParameters (Real size, bool attenuationEnabled, Real constant, Real linear, Real quadratic, Real minSize, Real maxSize)
 Sets the size of points and how they are attenuated with distance.
 
void _setPointSpritesEnabled (bool enabled)
 Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points.
 
void _setPolygonMode (PolygonMode level)
 
virtual void _setProgramsFromHlms (const HlmsCache *hlmsCache)
 
void _setProjectionMatrix (const Matrix4 &m)
 Sets the projection transform matrix.
 
virtual void _setRenderOperation (const v1::CbRenderOp *cmd)=0
 
void _setRenderTarget (RenderTarget *target)
 Set current render target to target, enabling its GL context if needed.
 
virtual void _setRenderTarget (RenderTarget *target, uint8 viewportRenderTargetFlags)=0
 Set current render target to target, enabling its device context if needed.
 
void _setSceneBlending (SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendOperation op)
 
void _setSeparateSceneBlending (SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendFactor sourceFactorAlpha, SceneBlendFactor destFactorAlpha, SceneBlendOperation op, SceneBlendOperation alphaOp)
 
void _setSurfaceParams (const ColourValue &ambient, const ColourValue &diffuse, const ColourValue &specular, const ColourValue &emissive, Real shininess, TrackVertexColourType tracking)
 Sets the surface properties to be used for future rendering.
 
virtual void _setTessellationDomainTexture (size_t unit, const TexturePtr &tex)
 
virtual void _setTessellationHullTexture (size_t unit, const TexturePtr &tex)
 
virtual void _setTexture (size_t unit, bool enabled, const String &texname)
 Sets the texture to bind to a given texture unit.
 
void _setTexture (size_t unit, bool enabled, const TexturePtr &texPtr)
 
virtual void _setTexture (size_t unit, bool enabled, Texture *texPtr)=0
 Sets the texture to bind to a given texture unit.
 
void _setTextureAddressingMode (size_t stage, const TextureUnitState::UVWAddressingMode &uvw)
 
void _setTextureBlendMode (size_t unit, const LayerBlendModeEx &bm)
 Sets the texture blend modes from a TextureUnitState record.
 
void _setTextureBorderColour (size_t stage, const ColourValue &colour)
 
void _setTextureCoordCalculation (size_t unit, TexCoordCalcMethod m, const Frustum *frustum=0)
 Sets a method for automatically calculating texture coordinates for a stage.
 
void _setTextureCoordSet (size_t unit, size_t index)
 Sets the texture coordinate set to use for a texture unit.
 
virtual void _setTextureCS (uint32 slot, bool enabled, Texture *texPtr)=0
 Binds a regular texture to a Compute Shader.
 
void _setTextureLayerAnisotropy (size_t unit, unsigned int maxAnisotropy)
 
void _setTextureMatrix (size_t unit, const Matrix4 &xform)
 Sets the texture coordinate transformation matrix for a texture unit.
 
void _setTextureMipmapBias (size_t unit, float bias)
 
virtual void _setTextureProjectionRelativeTo (bool enabled, const Vector3 &pos)
 Notify the rendersystem that it should adjust texture projection to be relative to a different origin.
 
void _setTextureUnitCompareEnabled (size_t unit, bool compare)
 
void _setTextureUnitCompareFunction (size_t unit, CompareFunction function)
 
void _setTextureUnitFiltering (size_t unit, FilterType ftype, FilterOptions filter)
 
virtual void _setTextureUnitSettings (size_t texUnit, TextureUnitState &tl)
 Utility function for setting all the properties of a texture unit at once.
 
virtual void _setVertexArrayObject (const VertexArrayObject *vao)=0
 Part of the low level rendering interface.
 
void _setVertexTexture (size_t unit, const TexturePtr &tex)
 Binds a texture to a vertex, geometry, compute, tessellation hull or tessellation domain sampler.
 
void _setViewMatrix (const Matrix4 &m)
 Sets the view transform matrix.
 
void _setViewport (Viewport *vp)
 Sets the provided viewport as the active one for future rendering operations.
 
virtual void _setWorldMatrices (const Matrix4 *m, unsigned short count)
 Sets multiple world matrices (vertex blending).
 
void _setWorldMatrix (const Matrix4 &m)
 Sets the world transform matrix.
 
virtual void _startLegacyV1Rendering (void)
 May override the current VertexArrayObject!
 
void _update (void)
 Called once per frame, regardless of how many active workspaces there are.
 
void _useLights (const LightList &lights, unsigned short limit)
 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)
 
virtual void addClipPlane (const Plane &p)
 Add a user clipping plane.
 
virtual void addClipPlane (Real A, Real B, Real C, Real D)
 Add a user clipping plane.
 
virtual void addListener (Listener *l)
 Adds a listener to the custom events that this render system can raise.
 
virtual bool areFixedFunctionLightsInViewSpace () const
 Are fixed-function lights provided in view space? Affects optimisation.
 
virtual void attachRenderTarget (RenderTarget &target)
 Attaches the passed render target to the render system.
 
virtual void beginGPUSampleProfile (const String &name, uint32 *hashCache)=0
 
virtual void beginProfileEvent (const String &eventName)
 This marks the beginning of an event for GPU profiling.
 
void bindGpuProgram (GpuProgram *prg)
 See RenderSystem.
 
void bindGpuProgramParameters (GpuProgramType gptype, GpuProgramParametersSharedPtr params, uint16 variabilityMask)
 See RenderSystem.
 
void bindGpuProgramPassIterationParameters (GpuProgramType gptype)
 Only binds Gpu program parameters used for passes that have more than one iteration rendering.
 
virtual bool checkExtension (const String &ext) const
 Checks for the presense of an API-specific extension (eg. Vulkan, GL)
 
void clearFrameBuffer (unsigned int buffers, const ColourValue &colour=ColourValue::Black, Real depth=1.0f, unsigned short stencil=0)
 Clears one or more frame buffers on the active render target.
 
virtual void clearUAVs (void)=0
 By default queueBindUAV will keep all other slots intact.
 
virtual void compositorWorkspaceBegin (CompositorWorkspace *workspace, const bool forceBeginFrame)
 See RenderSystem::updateCompositorManager.
 
virtual void compositorWorkspaceEnd (CompositorWorkspace *workspace, const bool forceEndFrame)
 See RenderSystem::updateCompositorManager.
 
virtual void compositorWorkspaceUpdate (CompositorWorkspace *workspace)
 See RenderSystem::updateCompositorManager.
 
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.
 
HardwareOcclusionQuerycreateHardwareOcclusionQuery ()
 Create an object for performing hardware occlusion queries.
 
virtual MultiRenderTargetcreateMultiRenderTarget (const String &name)
 Create a MultiRenderTarget, which is a render target that renders to multiple RenderTextures at once.
 
void createStereoDriver (const NameValuePairList *miscParams)
 Creates a bridge to the Direct3D stereo driver implementation.
 
virtual void createUniqueDepthBufferFor (RenderTarget *renderTarget, bool exactMatch)
 
virtual void deinitGPUProfiling (void)=0
 
virtual void destroyHardwareOcclusionQuery (HardwareOcclusionQuery *hq)
 Destroy a hardware occlusion query object.
 
void destroyRenderTarget (const String &name)
 Destroys a render target of any sort.
 
virtual void destroyRenderTexture (const String &name)
 Destroys a render texture.
 
virtual void destroyRenderWindow (const String &name)
 Destroys a render window.
 
virtual RenderTargetdetachRenderTarget (const String &name)
 Detaches the render target with the passed name from the render system and returns a pointer to it.
 
void determineFSAASettings (IDirect3DDevice9 *d3d9Device, size_t fsaa, const String &fsaaHint, D3DFORMAT d3dPixelFormat, bool fullScreen, D3DMULTISAMPLE_TYPE *outMultisampleType, DWORD *outMultisampleQuality)
 Take in some requested FSAA settings and output supported D3D settings.
 
virtual void discardFrameBuffer (unsigned int buffers)=0
 Instructs the viewport to 'discard' the buffers.
 
void enableClipPlane (ushort index, bool enable)
 
virtual void endGPUSampleProfile (const String &name)=0
 
virtual void endProfileEvent (void)
 Ends the currently active GPU profiling event.
 
void fireDeviceEvent (D3D9Device *device, const String &name)
 Fires a device related event.
 
virtual void flushUAVs (void)=0
 Forces to take effect all the queued UAV binding requests.
 
const RenderSystemCapabilitiesgetCapabilities (void) const
 Gets the capabilities of the render system.
 
VertexElementType getColourVertexElementType () const
 Get the native VertexElementType for a compact 32-bit colour value for this rendersystem.
 
ConfigOptionMapgetConfigOptions ()
 Returns the details of this API's configuration options.
 
virtual void getCustomAttribute (const String &name, void *pData)
 Gets a custom (maybe platform-specific) attribute.
 
bool getDebugShaders (void) const
 
unsigned int getDisplayMonitorCount () const
 Gets the number of display monitors.
 
virtual const DriverVersiongetDriverVersion (void) const
 Returns the driver version.
 
String getErrorDescription (long errorNumber) const
 Returns a description of an error code.
 
const StringgetFriendlyName () const
 Returns the friendly name of the render system.
 
v1::HardwareVertexBufferSharedPtr getGlobalInstanceVertexBuffer () const
 Returns the global instance vertex buffer.
 
v1::VertexDeclarationgetGlobalInstanceVertexBufferVertexDeclaration () const
 Gets vertex declaration for the global vertex buffer for the global instancing.
 
size_t getGlobalNumberOfInstances () const
 Gets the global number of instances.
 
Real getHorizontalTexelOffset ()
 Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this rendersystem.
 
virtual bool getInvertVertexWinding (void) const
 Indicates whether or not the vertex windings set will be inverted for the current render (e.g.
 
Real getMaximumDepthInputValue ()
 Gets the maximum (farthest) depth value to be used when rendering using identity transforms.
 
Real getMinimumDepthInputValue ()
 Gets the minimum (closest) depth value to be used when rendering using identity transforms.
 
MultiheadUseType getMultiheadUse () const
 Returns how multihead should be activated.
 
RenderSystemCapabilitiesgetMutableCapabilities ()
 Get a pointer to the current capabilities being used by the RenderSystem.
 
const StringgetName () const
 Returns the name of the rendering system.
 
uint16 getNativeShadingLanguageVersion () const
 Gets the native shading language version for this render system.
 
virtual const PixelFormatToShaderTypegetPixelFormatToShaderType (void) const =0
 
virtual const StringVectorgetRenderSystemEvents (void) const
 Gets a list of the rendersystem specific events that this rendersystem can raise.
 
virtual RenderTargetgetRenderTarget (const String &name)
 Returns a pointer to the render target with the passed name, or NULL if that render target cannot be found.
 
virtual RenderTargetIterator getRenderTargetIterator (void)
 Returns a specialised MapIterator over all render targets attached to the RenderSystem.
 
virtual Real getRSDepthRange (void) 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;.
 
const StencilParamsgetStencilBufferParams (void) const
 
VaoManagergetVaoManager (void) const
 
Real getVerticalTexelOffset ()
 Returns the vertical texel offset value required for mapping texel origins to pixel origins in this rendersystem.
 
bool getWBufferEnabled (void) const
 Returns true if the renderer will try to use W-buffers when available.
 
virtual bool hasAnisotropicMipMapFilter () const
 Determines if the system has anisotropic mip map filter support.
 
virtual void initConfigOptions ()
 
virtual void initGPUProfiling (void)=0
 
bool IsActiveDeviceLost ()
 
virtual bool isGpuProgramBound (GpuProgramType gptype)
 Returns whether or not a Gpu program of the given type is currently bound.
 
virtual bool isStaticBufferLockable () const
 
virtual void markProfileEvent (const String &eventName)
 Marks an instantaneous event for graphics profilers.
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
voidoperator new (size_t sz, void *ptr)
 placement operator new
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 
void postExtraThreadsStarted ()
 
void preExtraThreadsStarted ()
 Tell the rendersystem to perform any prep tasks it needs to directly before other threads which might access the rendering API are registered.
 
virtual void queueBindUAV (uint32 slot, TexturePtr texture, ResourceAccess::ResourceAccess access=ResourceAccess::ReadWrite, int32 mipmapLevel=0, int32 textureArrayIndex=0, PixelFormat pixelFormat=PF_UNKNOWN)=0
 Queues the binding of an UAV to the binding point/slot.
 
virtual void queueBindUAV (uint32 slot, UavBufferPacked *buffer, ResourceAccess::ResourceAccess access=ResourceAccess::ReadWrite, size_t offset=0, size_t sizeBytes=0)=0
 See other overload.
 
void registerThread ()
 Register the an additional thread which may make calls to rendersystem-related objects.
 
void reinitialise ()
 Restart the renderer (normally following a change in settings).
 
virtual void removeListener (Listener *l)
 Remove a listener to the custom events that this render system can raise.
 
virtual void resetClipPlanes ()
 Clears the user clipping region.
 
void setAmbientLight (float r, float g, float b)
 
void setClipPlane (ushort index, Real A, Real B, Real C, Real D)
 
virtual void setClipPlanes (const PlaneList &clipPlanes)
 Sets the user clipping region.
 
void setConfigOption (const String &name, const String &value)
 Sets an option for this API.
 
virtual void setCurrentPassIterationCount (const size_t count)
 set the current multi pass count value.
 
void setDebugShaders (bool bDebugShaders)
 Instructs the RenderSystem to compile shaders without optimizations and with debug information, for easier debugging on APIs that support it.
 
virtual void setDepthBufferFor (RenderTarget *renderTarget, bool exactMatch)
 Retrieves an existing DepthBuffer or creates a new one suited for the given RenderTarget and sets it.
 
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.
 
virtual bool setDrawBuffer (ColourBufferType colourBuffer)
 Sets the colour buffer that the render system will to draw.
 
void setGlobalInstanceVertexBuffer (const v1::HardwareVertexBufferSharedPtr &val)
 Sets the global instance vertex buffer.
 
void setGlobalInstanceVertexBufferVertexDeclaration (v1::VertexDeclaration *val)
 Sets vertex declaration for the global vertex buffer for the global instancing.
 
void setGlobalNumberOfInstances (const size_t val)
 Sets the global number of instances.
 
void setInvertVertexWinding (bool invert)
 Sets whether or not vertex windings set should be inverted; this can be important for rendering reflections.
 
void setScissorTest (bool enabled, size_t left=0, size_t top=0, size_t right=800, size_t bottom=600)
 
void setStencilBufferParams (CompareFunction func=CMPF_ALWAYS_PASS, uint32 refValue=0, uint32 compareMask=0xFFFFFFFF, uint32 writeMask=0xFFFFFFFF, StencilOperation stencilFailOp=SOP_KEEP, StencilOperation depthFailOp=SOP_KEEP, StencilOperation passOp=SOP_KEEP, bool twoSidedOperation=false, bool readBackAsTexture=false)
 
virtual void setStencilBufferParams (uint32 refValue, const StencilParams &stencilParams)
 This method allows you to set all the stencil buffer parameters in one call.
 
void setStencilCheckEnabled (bool enabled)
 
virtual void setUavStartingSlot (uint32 startingSlot)
 In Direct3D11, UAV & RenderTargets share the same slots.
 
void setVertexBufferBinding (VertexBufferBinding *binding)
 
void setVertexBufferBinding (VertexBufferBinding *binding, size_t numberOfInstances, bool useGlobalInstancingVertexBufferIsAvailable, bool indexesUsed)
 
void setVertexDeclaration (VertexDeclaration *decl)
 
void setVertexDeclaration (VertexDeclaration *decl, bool useGlobalInstancingVertexBufferIsAvailable)
 
void setWBufferEnabled (bool enabled)
 Sets whether or not W-buffers are enabled if they are available for this renderer.
 
void shutdown ()
 Shutdown the renderer and cleanup resources.
 
void unbindGpuProgram (GpuProgramType gptype)
 See RenderSystem.
 
void unregisterThread ()
 Unregister an additional thread which may make calls to rendersystem-related objects.
 
virtual void updateCompositorManager (CompositorManager2 *compositorManager, SceneManagerEnumerator &sceneManagers, HlmsManager *hlmsManager)
 This gives the renderer a chance to perform the compositor update in a special way.
 
virtual void useCustomRenderSystemCapabilities (RenderSystemCapabilities *capabilities)
 Force the render system to use the special capabilities.
 
String validateConfigOptions ()
 Validates the options set for the rendering system, returning a message if there are problems.
 

Static Public Member Functions

static IDirect3DDevice9getActiveD3D9Device ()
 
static IDirect3DDevice9getActiveD3D9DeviceIfExists ()
 
static D3D9DeviceManagergetDeviceManager ()
 
static IDirect3D9getDirect3D9 ()
 
static IDirect3DDevice9getResourceCreationDevice (UINT index)
 
static UINT getResourceCreationDeviceCount ()
 
static D3D9ResourceManagergetResourceManager ()
 
static ListenergetSharedListener (void)
 Retrieve a pointer to the current shared render system listener.
 
static bool isDirectX9Ex ()
 Tells whether the system is initialized with DirectX 9Ex driver Read more in http://msdn.microsoft.com/en-us/library/windows/desktop/ee890072(v=vs.85).aspx.
 
static void setSharedListener (Listener *listener)
 Sets shared listener.
 

Friends

class D3D9Device
 
class D3D9DeviceManager
 

Detailed Description

Implementation of DirectX9 as a rendering system.

Member Typedef Documentation

◆ RenderTargetIterator

Member Enumeration Documentation

◆ MultiheadUseType

Enumerator
mutAuto 
mutYes 
mutNo 

Constructor & Destructor Documentation

◆ D3D9RenderSystem()

Ogre::D3D9RenderSystem::D3D9RenderSystem ( HINSTANCE  hInstance)

◆ ~D3D9RenderSystem()

Ogre::D3D9RenderSystem::~D3D9RenderSystem ( )

Member Function Documentation

◆ _addManualDepthBuffer()

DepthBuffer * Ogre::D3D9RenderSystem::_addManualDepthBuffer ( IDirect3DDevice9 depthSurfaceDevice,
IDirect3DSurface9 surf 
)

This function is meant to add Depth Buffers to the pool that aren't released when the DepthBuffer is deleted.

This is specially useful to put the Depth Buffer created along with the window's back buffer into the pool. All depth buffers introduced with this method go to POOL_DEFAULT

◆ _applyObliqueDepthProjection()

void Ogre::D3D9RenderSystem::_applyObliqueDepthProjection ( Matrix4 matrix,
const Plane plane,
bool  forGpuProgram 
)
virtual

Update a perspective projection matrix to use 'oblique depth projection'.

Remarks
This method can be used to change the nature of a perspective transform in order to make the near plane not perpendicular to the camera view direction, but to be at some different orientation. This can be useful for performing arbitrary clipping (e.g. to a reflection plane) which could otherwise only be done using user clip planes, which are more expensive, and not necessarily supported on all cards.
Parameters
matrixThe existing projection matrix. Note that this must be a perspective transform (not orthographic), and must not have already been altered by this method. The matrix will be altered in-place.
planeThe plane which is to be used as the clipping plane. This plane must be in CAMERA (view) space.
forGpuProgramIs this for use with a Gpu program or fixed-function

Implements Ogre::RenderSystem.

◆ _beginFrame()

void Ogre::D3D9RenderSystem::_beginFrame ( )
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.

Implements Ogre::RenderSystem.

◆ _beginFrameOnce()

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

Signifies the beginning of the main frame.

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

Reimplemented in Ogre::MetalRenderSystem.

◆ _beginGeometryCount()

virtual void Ogre::RenderSystem::_beginGeometryCount ( void  )
virtualinherited

The RenderSystem will keep a count of tris rendered, this resets the count.

◆ _bindTextureUavCS()

virtual void Ogre::RenderSystem::_bindTextureUavCS ( uint32  slot,
Texture texture,
ResourceAccess::ResourceAccess  access,
int32  mipmapLevel,
int32  textureArrayIndex,
PixelFormat  pixelFormat 
)
pure virtualinherited

Binds an UAV texture to a Compute Shader.

Remarks
See also
queueBindUAV param description.
Internal Developer Notes: D3D11 keeps UAVs that affect rendering separate from UAVs that affect Compute Shaders. Hence queueBindUAV & _bindTextureUavCS 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.

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

◆ _checkTextureFilteringSupported()

bool Ogre::D3D9RenderSystem::_checkTextureFilteringSupported ( TextureType  ttype,
PixelFormat  format,
int  usage 
)

Check whether or not filtering is supported for the precise texture format requested with the given usage options.

◆ _cleanupDepthBuffers() [1/3]

void Ogre::RenderSystem::_cleanupDepthBuffers ( bool  bCleanManualBuffers = true)

This function does NOT override RenderSystem::_cleanupDepthBuffers(bool) functionality.

On multi monitor setups, when a device becomes "inactive" (it has no RenderWindows; like when the window was moved from one monitor to another); the Device will be destroyed, meaning all it's depth buffers (auto & manual) should be removed from the pool, but only selectively removing those created by that D3D9Device.

Parameters
Creator device to compare against. Shouldn't be null

◆ _cleanupDepthBuffers() [2/3]

void Ogre::D3D9RenderSystem::_cleanupDepthBuffers ( IDirect3DDevice9 creator)

◆ _cleanupDepthBuffers() [3/3]

void Ogre::D3D9RenderSystem::_cleanupDepthBuffers ( IDirect3DSurface9 manualSurface)

This function does NOT override RenderSystem::_cleanupDepthBuffers(bool) functionality.

Manually created surfaces may be released arbitrarely without being pulled out from the pool (specially RenderWindows) this function takes care of that.

Parameters
manualSurfaceDepth buffer surface to compare against. Shouldn't be null

◆ _convertProjectionMatrix()

void Ogre::D3D9RenderSystem::_convertProjectionMatrix ( const Matrix4 matrix,
Matrix4 dest,
bool  forGpuProgram = false 
)
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.

Implements Ogre::RenderSystem.

◆ _createDepthBufferFor() [1/2]

DepthBuffer * Ogre::D3D9RenderSystem::_createDepthBufferFor ( RenderTarget renderTarget)

Creates a DepthBuffer that can be attached to the specified RenderTarget.

Remarks
It doesn't attach anything, it just returns a pointer to a new DepthBuffer Caller is responsible for putting this buffer into the right pool, for attaching, and deleting it. Here's where API-specific magic happens. Don't call this directly unless you know what you're doing.

◆ _createDepthBufferFor() [2/2]

virtual DepthBuffer * Ogre::RenderSystem::_createDepthBufferFor ( RenderTarget renderTarget,
bool  exactMatchFormat 
)
pure virtualinherited

Creates a DepthBuffer that can be attached to the specified RenderTarget.

Remarks
It doesn't attach anything, it just returns a pointer to a new DepthBuffer Caller is responsible for putting this buffer into the right pool, for attaching, and deleting it. Here's where API-specific magic happens. Don't call this directly unless you know what you're doing.

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

◆ _createRenderWindow()

RenderWindow * Ogre::D3D9RenderSystem::_createRenderWindow ( const String name,
unsigned int  width,
unsigned int  height,
bool  fullScreen,
const NameValuePairList miscParams = 0 
)
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  
FSAA Positive integer (usually 0, 2, 4, 8, 16) 0 Full screen antialiasing factor  
FSAAHint Depends on RenderSystem and hardware. Currently supports:
"Quality": on systems that have an option to prefer higher AA quality over speed, use it
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

Implements Ogre::RenderSystem.

◆ _createRenderWindows()

bool Ogre::D3D9RenderSystem::_createRenderWindows ( const RenderWindowDescriptionList renderWindowDescriptions,
RenderWindowList 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 from Ogre::RenderSystem.

◆ _destroyDepthBuffer()

virtual void Ogre::RenderSystem::_destroyDepthBuffer ( DepthBuffer depthBuffer)
virtualinherited

◆ _disableTextureUnit()

void Ogre::D3D9RenderSystem::_disableTextureUnit ( size_t  texUnit)
virtual

Turns off a texture unit.

Reimplemented from Ogre::RenderSystem.

◆ _disableTextureUnitsFrom()

virtual void Ogre::RenderSystem::_disableTextureUnitsFrom ( size_t  texUnit)
virtualinherited

Disables all texture units from the given unit upwards.

◆ _dispatch()

◆ _endFrame()

void Ogre::D3D9RenderSystem::_endFrame ( )
virtual

Ends rendering of a frame to the current viewport.

Implements Ogre::RenderSystem.

◆ _endFrameOnce()

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

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

Gets called AFTER all RenderWindows have been swapped.

Reimplemented in Ogre::MetalRenderSystem.

◆ _executeResourceTransition()

virtual void Ogre::RenderSystem::_executeResourceTransition ( ResourceTransition resTransition)
inlinevirtualinherited

Reimplemented in Ogre::GL3PlusRenderSystem.

◆ _getBatchCount()

virtual unsigned int Ogre::RenderSystem::_getBatchCount ( void  ) const
virtualinherited

Reports the number of batches rendered since the last _beginGeometryCount call.

◆ _getDefaultViewportMaterialScheme()

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

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.

◆ _getDepthStencilFormatFor()

D3DFORMAT Ogre::D3D9RenderSystem::_getDepthStencilFormatFor ( D3DFORMAT  fmt)

Check which depthStencil formats can be used with a certain pixel format, and return the best suited.

◆ _getFaceCount()

virtual unsigned int Ogre::RenderSystem::_getFaceCount ( void  ) const
virtualinherited

Reports the number of tris rendered since the last _beginGeometryCount call.

◆ _getVertexCount()

virtual unsigned int Ogre::RenderSystem::_getVertexCount ( void  ) const
virtualinherited

Reports the number of vertices passed to the renderer since the last _beginGeometryCount call.

◆ _getViewport()

virtual Viewport * Ogre::RenderSystem::_getViewport ( void  )
virtualinherited

Get the current active viewport for rendering.

◆ _hlmsBlendblockCreated()

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

◆ _hlmsBlendblockDestroyed()

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

◆ _hlmsComputePipelineStateObjectCreated()

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

◆ _hlmsComputePipelineStateObjectDestroyed()

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

◆ _hlmsMacroblockCreated()

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

◆ _hlmsMacroblockDestroyed()

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

◆ _hlmsPipelineStateObjectCreated()

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

◆ _hlmsPipelineStateObjectDestroyed()

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

◆ _hlmsSamplerblockCreated()

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

◆ _hlmsSamplerblockDestroyed()

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

◆ _initialise()

RenderWindow * Ogre::D3D9RenderSystem::_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 from Ogre::RenderSystem.

◆ _initRenderTargets()

virtual void Ogre::RenderSystem::_initRenderTargets ( void  )
virtualinherited

Utility method for initialising all render targets attached to this rendering system.

◆ _makeOrthoMatrix()

void Ogre::D3D9RenderSystem::_makeOrthoMatrix ( const Radian fovy,
Real  aspect,
Real  nearPlane,
Real  farPlane,
Matrix4 dest,
bool  forGpuProgram = false 
)
virtual

Builds an orthographic projection matrix 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.

Implements Ogre::RenderSystem.

◆ _makeProjectionMatrix() [1/2]

void Ogre::D3D9RenderSystem::_makeProjectionMatrix ( const Radian fovy,
Real  aspect,
Real  nearPlane,
Real  farPlane,
Matrix4 dest,
bool  forGpuProgram = false 
)
virtual

Builds a perspective projection matrix 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.

Implements Ogre::RenderSystem.

◆ _makeProjectionMatrix() [2/2]

void Ogre::D3D9RenderSystem::_makeProjectionMatrix ( Real  left,
Real  right,
Real  bottom,
Real  top,
Real  nearPlane,
Real  farPlane,
Matrix4 dest,
bool  forGpuProgram = false 
)
virtual

Builds a perspective projection matrix for the case when frustum is not centered around camera.

Remarks
Viewport coordinates are in camera coordinate frame, i.e. camera is at the origin.

Implements Ogre::RenderSystem.

◆ _notifyCompositorNodeSwitchedRenderTarget()

virtual void Ogre::RenderSystem::_notifyCompositorNodeSwitchedRenderTarget ( RenderTarget previousTarget)
inlinevirtualinherited

This function was created because of Metal.

The Metal API doesn't have a 'device->clear( texture )' function. Instead we must specify we want to start rendering to a cleared surface. This allows mobile TBDR GPUs to begin rendering without having to load any data from memory (saves a lot of bandwidth and battery).

But it also means Ogre must do an effort to delay the clear operation as much as possible (until actual rendering to it, or until the texture is used for reading/sampling).
Normally, we'd want to stop deferring a clear and immediately issue it when _setRenderTarget gets called with a different pointer. However, the following scenario is too common: target rtt { pass clear {} pass render_scene { shadows myShadowNode } }

Ogre will first issue a clear, then begin executing the shadow node (which switches to the shadow map) then switch back to the original rtt to resume regular rendinering. In this common case we want to delay the clear, but _setRenderTarget is clearly not an trusted indication (we would get many false positives).

Therefore the compositor has much better knowledge, and it informs of this fact via this call.
Remarks
TODO: This function will eventually be removed. The Compositor should be creating a resource transition. We only need to force clear when we're going to be using the target as a texture for reading/sampling. That's exactly what ResourceTransitions are for.
Parameters
previousRenderTargetRenderTarget that was being used (and we should clear if we have to).

Reimplemented in Ogre::MetalRenderSystem.

◆ _pauseFrame()

virtual RenderSystemContext * Ogre::D3D9RenderSystem::_pauseFrame ( void  )
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.

Reimplemented from Ogre::RenderSystem.

◆ _render() [1/6]

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

Renders the VAO. Assumes _setVertexArrayObject has already been called.

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

◆ _render() [2/6]

◆ _render() [3/6]

void Ogre::D3D9RenderSystem::_render ( const RenderOperation &  op)

◆ _render() [4/6]

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

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

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

◆ _render() [5/6]

◆ _render() [6/6]

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

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::D3D11RenderSystem, Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, and Ogre::MetalRenderSystem.

◆ _renderEmulated() [1/2]

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

◆ _renderEmulated() [2/2]

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

◆ _renderEmulatedNoBaseInstance() [1/2]

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

◆ _renderEmulatedNoBaseInstance() [2/2]

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

◆ _renderNoBaseInstance() [1/2]

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

◆ _renderNoBaseInstance() [2/2]

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

◆ _renderUsingReadBackAsTexture()

virtual void Ogre::RenderSystem::_renderUsingReadBackAsTexture ( unsigned int  secondPass,
Ogre::String  variableName,
unsigned int  StartSlot 
)
virtualinherited

Reimplemented in Ogre::D3D11RenderSystem.

◆ _resourceTransitionCreated()

virtual void Ogre::RenderSystem::_resourceTransitionCreated ( ResourceTransition resTransition)
inlinevirtualinherited

Reimplemented in Ogre::GL3PlusRenderSystem.

◆ _resourceTransitionDestroyed()

virtual void Ogre::RenderSystem::_resourceTransitionDestroyed ( ResourceTransition resTransition)
inlinevirtualinherited

Reimplemented in Ogre::GL3PlusRenderSystem.

◆ _resumeFrame()

virtual void Ogre::D3D9RenderSystem::_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

Reimplemented from Ogre::RenderSystem.

◆ _setAlphaRejectSettings()

void Ogre::D3D9RenderSystem::_setAlphaRejectSettings ( CompareFunction  func,
unsigned char  value,
bool  alphaToCoverage 
)

◆ _setBindingType()

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

Set texture unit binding type.

Reimplemented in Ogre::D3D11RenderSystem.

◆ _setColourBufferWriteEnabled()

void Ogre::D3D9RenderSystem::_setColourBufferWriteEnabled ( bool  red,
bool  green,
bool  blue,
bool  alpha 
)

◆ _setComputePso()

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

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::D3D11RenderSystem, Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.

◆ _setCullingMode()

void Ogre::D3D9RenderSystem::_setCullingMode ( CullingMode  mode)

◆ _setDepthBias()

void Ogre::D3D9RenderSystem::_setDepthBias ( float  constantBias,
float  slopeScaleBias 
)

◆ _setDepthBufferCheckEnabled()

void Ogre::D3D9RenderSystem::_setDepthBufferCheckEnabled ( bool  enabled = true)

◆ _setDepthBufferFunction()

void Ogre::D3D9RenderSystem::_setDepthBufferFunction ( CompareFunction  func = CMPF_LESS_EQUAL)

◆ _setDepthBufferParams()

void Ogre::D3D9RenderSystem::_setDepthBufferParams ( bool  depthTest = true,
bool  depthWrite = true,
CompareFunction  depthFunction = CMPF_LESS_EQUAL 
)

◆ _setDepthBufferWriteEnabled()

void Ogre::D3D9RenderSystem::_setDepthBufferWriteEnabled ( bool  enabled = true)

◆ _setGeometryTexture()

virtual void Ogre::RenderSystem::_setGeometryTexture ( size_t  unit,
const TexturePtr tex 
)
virtualinherited

◆ _setHlmsBlendblock()

virtual void Ogre::D3D9RenderSystem::_setHlmsBlendblock ( const HlmsBlendblock blendblock)
virtual

◆ _setHlmsMacroblock()

virtual void Ogre::D3D9RenderSystem::_setHlmsMacroblock ( const HlmsMacroblock macroblock)
virtual

◆ _setHlmsSamplerblock()

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

@See HlmsSamplerblock.

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

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

◆ _setHlmsSamplerblockCS()

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

◆ _setIndirectBuffer()

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

◆ _setPipelineStateObject()

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

◆ _setPointParameters()

void Ogre::D3D9RenderSystem::_setPointParameters ( Real  size,
bool  attenuationEnabled,
Real  constant,
Real  linear,
Real  quadratic,
Real  minSize,
Real  maxSize 
)
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.

Implements Ogre::RenderSystem.

◆ _setPointSpritesEnabled()

void Ogre::D3D9RenderSystem::_setPointSpritesEnabled ( bool  enabled)
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.

Implements Ogre::RenderSystem.

◆ _setPolygonMode()

void Ogre::D3D9RenderSystem::_setPolygonMode ( PolygonMode  level)

◆ _setProgramsFromHlms()

virtual void Ogre::D3D9RenderSystem::_setProgramsFromHlms ( const HlmsCache hlmsCache)
virtual

◆ _setProjectionMatrix()

void Ogre::D3D9RenderSystem::_setProjectionMatrix ( const Matrix4 m)
virtual

Sets the projection transform matrix.

Implements Ogre::RenderSystem.

◆ _setRenderOperation()

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

◆ _setRenderTarget() [1/2]

void Ogre::D3D9RenderSystem::_setRenderTarget ( RenderTarget target)

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

◆ _setRenderTarget() [2/2]

virtual void Ogre::RenderSystem::_setRenderTarget ( RenderTarget target,
uint8  viewportRenderTargetFlags 
)
pure virtualinherited

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

Parameters
viewportRenderTargetFlagsSee ViewportRenderTargetFlags See CompositorPassDef::mColourWrite The RenderTarget is needed to know the depth/stencil information.

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

◆ _setSceneBlending()

void Ogre::D3D9RenderSystem::_setSceneBlending ( SceneBlendFactor  sourceFactor,
SceneBlendFactor  destFactor,
SceneBlendOperation  op 
)

◆ _setSeparateSceneBlending()

void Ogre::D3D9RenderSystem::_setSeparateSceneBlending ( SceneBlendFactor  sourceFactor,
SceneBlendFactor  destFactor,
SceneBlendFactor  sourceFactorAlpha,
SceneBlendFactor  destFactorAlpha,
SceneBlendOperation  op,
SceneBlendOperation  alphaOp 
)

◆ _setSurfaceParams()

void Ogre::D3D9RenderSystem::_setSurfaceParams ( const ColourValue ambient,
const ColourValue diffuse,
const ColourValue specular,
const ColourValue emissive,
Real  shininess,
TrackVertexColourType  tracking 
)
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.

Implements Ogre::RenderSystem.

◆ _setTessellationDomainTexture()

virtual void Ogre::RenderSystem::_setTessellationDomainTexture ( size_t  unit,
const TexturePtr tex 
)
virtualinherited

◆ _setTessellationHullTexture()

virtual void Ogre::RenderSystem::_setTessellationHullTexture ( size_t  unit,
const TexturePtr tex 
)
virtualinherited

◆ _setTexture() [1/3]

virtual void Ogre::RenderSystem::_setTexture ( size_t  unit,
bool  enabled,
const String texname 
)
virtualinherited

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
texnameThe name of the texture to use - this should have already been loaded with TextureManager::load.

◆ _setTexture() [2/3]

void Ogre::D3D9RenderSystem::_setTexture ( size_t  unit,
bool  enabled,
const TexturePtr texPtr 
)

◆ _setTexture() [3/3]

virtual void Ogre::RenderSystem::_setTexture ( size_t  unit,
bool  enabled,
Texture texPtr 
)
pure virtualinherited

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.

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

◆ _setTextureAddressingMode()

void Ogre::D3D9RenderSystem::_setTextureAddressingMode ( size_t  stage,
const TextureUnitState::UVWAddressingMode &  uvw 
)

◆ _setTextureBlendMode()

void Ogre::D3D9RenderSystem::_setTextureBlendMode ( size_t  unit,
const LayerBlendModeEx bm 
)
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

Implements Ogre::RenderSystem.

◆ _setTextureBorderColour()

void Ogre::D3D9RenderSystem::_setTextureBorderColour ( size_t  stage,
const ColourValue colour 
)

◆ _setTextureCoordCalculation()

void Ogre::D3D9RenderSystem::_setTextureCoordCalculation ( size_t  unit,
TexCoordCalcMethod  m,
const Frustum frustum = 0 
)
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

Implements Ogre::RenderSystem.

◆ _setTextureCoordSet()

void Ogre::D3D9RenderSystem::_setTextureCoordSet ( size_t  unit,
size_t  index 
)
virtual

Sets the texture coordinate set to use for a texture unit.

Meant for use internally - not generally used directly by apps - the Material and TextureUnitState classes let you manage textures far more easily.

Parameters
unitTexture unit as above
indexThe index of the texture coordinate set to use.

Implements Ogre::RenderSystem.

◆ _setTextureCS()

virtual void Ogre::RenderSystem::_setTextureCS ( uint32  slot,
bool  enabled,
Texture texPtr 
)
pure virtualinherited

◆ _setTextureLayerAnisotropy()

void Ogre::D3D9RenderSystem::_setTextureLayerAnisotropy ( size_t  unit,
unsigned int  maxAnisotropy 
)

◆ _setTextureMatrix()

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

Sets the texture coordinate transformation matrix for a texture unit.

Parameters
unitTexture unit to affect
xformThe 4x4 matrix

Implements Ogre::RenderSystem.

◆ _setTextureMipmapBias()

void Ogre::D3D9RenderSystem::_setTextureMipmapBias ( size_t  unit,
float  bias 
)

◆ _setTextureProjectionRelativeTo()

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

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

◆ _setTextureUnitCompareEnabled()

void Ogre::D3D9RenderSystem::_setTextureUnitCompareEnabled ( size_t  unit,
bool  compare 
)

◆ _setTextureUnitCompareFunction()

void Ogre::D3D9RenderSystem::_setTextureUnitCompareFunction ( size_t  unit,
CompareFunction  function 
)

◆ _setTextureUnitFiltering()

void Ogre::D3D9RenderSystem::_setTextureUnitFiltering ( size_t  unit,
FilterType  ftype,
FilterOptions  filter 
)

◆ _setTextureUnitSettings()

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

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.

◆ _setVertexArrayObject()

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

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::D3D11RenderSystem, Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.

◆ _setVertexTexture()

void Ogre::D3D9RenderSystem::_setVertexTexture ( size_t  unit,
const TexturePtr 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 from Ogre::RenderSystem.

◆ _setViewMatrix()

void Ogre::D3D9RenderSystem::_setViewMatrix ( const Matrix4 m)
virtual

Sets the view transform matrix.

Implements Ogre::RenderSystem.

◆ _setViewport()

void Ogre::D3D9RenderSystem::_setViewport ( Viewport vp)
virtual

Sets the provided viewport as the active one for future rendering operations.

This viewport is aware of it's own camera and render target. Must be implemented by subclass.

Parameters
vpPointer to the appropriate viewport.

Implements Ogre::RenderSystem.

◆ _setWorldMatrices()

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

Sets multiple world matrices (vertex blending).

◆ _setWorldMatrix()

void Ogre::D3D9RenderSystem::_setWorldMatrix ( const Matrix4 m)
virtual

Sets the world transform matrix.

Implements Ogre::RenderSystem.

◆ _startLegacyV1Rendering()

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

May override the current VertexArrayObject!

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

◆ _update()

void Ogre::RenderSystem::_update ( void  )
inherited

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

◆ _useLights()

void Ogre::D3D9RenderSystem::_useLights ( const LightList lights,
unsigned short  limit 
)
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)

Implements Ogre::RenderSystem.

◆ addClipPlane() [1/2]

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

Add a user clipping plane.

◆ addClipPlane() [2/2]

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

Add a user clipping plane.

◆ addListener()

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

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

◆ areFixedFunctionLightsInViewSpace()

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

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

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

◆ attachRenderTarget()

virtual void Ogre::RenderSystem::attachRenderTarget ( RenderTarget target)
virtualinherited

Attaches the passed render target to the render system.

◆ beginGPUSampleProfile()

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

◆ beginProfileEvent()

virtual void Ogre::D3D9RenderSystem::beginProfileEvent ( const String eventName)
virtual

This marks the beginning of an event for GPU profiling.

Implements Ogre::RenderSystem.

◆ bindGpuProgram()

void Ogre::D3D9RenderSystem::bindGpuProgram ( GpuProgram prg)

◆ bindGpuProgramParameters()

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

See RenderSystem.

Implements Ogre::RenderSystem.

◆ bindGpuProgramPassIterationParameters()

void Ogre::D3D9RenderSystem::bindGpuProgramPassIterationParameters ( GpuProgramType  gptype)
virtual

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

Implements Ogre::RenderSystem.

◆ checkExtension()

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

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

Reimplemented in Ogre::GLES2RenderSystem.

◆ clearFrameBuffer()

void Ogre::D3D9RenderSystem::clearFrameBuffer ( unsigned int  buffers,
const ColourValue colour = ColourValue::Black,
Real  depth = 1.0f,
unsigned short  stencil = 0 
)
virtual

Clears one or more frame buffers on the active render target.

Parameters
buffersCombination of one or more elements of FrameBufferType denoting which buffers are to be cleared
colourThe colour to clear the colour buffer with, if enabled
depthThe value to initialise the depth buffer with, if enabled
stencilThe value to initialise the stencil buffer with, if enabled.

Implements Ogre::RenderSystem.

◆ clearUAVs()

virtual void Ogre::RenderSystem::clearUAVs ( void  )
pure virtualinherited

By default queueBindUAV will keep all other slots intact.

Calling this function will unset all bound UAVs. Will take effect after flushUAVs or setting a new RT.

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

◆ compositorWorkspaceBegin()

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

◆ compositorWorkspaceEnd()

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

◆ compositorWorkspaceUpdate()

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

◆ convertColourValue()

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

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()

HardwareOcclusionQuery * Ogre::D3D9RenderSystem::createHardwareOcclusionQuery ( )
virtual

Create an object for performing hardware occlusion queries.

Implements Ogre::RenderSystem.

◆ createMultiRenderTarget()

virtual MultiRenderTarget * Ogre::D3D9RenderSystem::createMultiRenderTarget ( const String name)
virtual

Create a MultiRenderTarget, which is a render target that renders to multiple RenderTextures at once.

Surfaces can be bound and unbound at will. This fails if mCapabilities->getNumMultiRenderTargets() is smaller than 2.

Implements Ogre::RenderSystem.

◆ createStereoDriver()

void Ogre::D3D9RenderSystem::createStereoDriver ( const NameValuePairList miscParams)

Creates a bridge to the Direct3D stereo driver implementation.

◆ createUniqueDepthBufferFor()

virtual void Ogre::RenderSystem::createUniqueDepthBufferFor ( RenderTarget renderTarget,
bool  exactMatch 
)
virtualinherited

◆ deinitGPUProfiling()

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

◆ destroyHardwareOcclusionQuery()

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

Destroy a hardware occlusion query object.

◆ destroyRenderTarget()

void Ogre::D3D9RenderSystem::destroyRenderTarget ( const String name)
virtual

Destroys a render target of any sort.

Reimplemented from Ogre::RenderSystem.

◆ destroyRenderTexture()

virtual void Ogre::RenderSystem::destroyRenderTexture ( const String name)
virtualinherited

Destroys a render texture.

◆ destroyRenderWindow()

virtual void Ogre::RenderSystem::destroyRenderWindow ( const String name)
virtualinherited

Destroys a render window.

◆ detachRenderTarget()

virtual RenderTarget * Ogre::D3D9RenderSystem::detachRenderTarget ( const String name)
virtual

Detaches the render target with the passed name from the render system and returns a pointer to it.

Note
If the render target cannot be found, NULL is returned.

Reimplemented from Ogre::RenderSystem.

◆ determineFSAASettings()

void Ogre::D3D9RenderSystem::determineFSAASettings ( IDirect3DDevice9 d3d9Device,
size_t  fsaa,
const String fsaaHint,
D3DFORMAT  d3dPixelFormat,
bool  fullScreen,
D3DMULTISAMPLE_TYPE outMultisampleType,
DWORD outMultisampleQuality 
)

Take in some requested FSAA settings and output supported D3D settings.

◆ discardFrameBuffer()

virtual void Ogre::RenderSystem::discardFrameBuffer ( unsigned int  buffers)
pure virtualinherited

◆ enableClipPlane()

void Ogre::D3D9RenderSystem::enableClipPlane ( ushort  index,
bool  enable 
)

◆ endGPUSampleProfile()

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

◆ endProfileEvent()

virtual void Ogre::D3D9RenderSystem::endProfileEvent ( void  )
virtual

Ends the currently active GPU profiling event.

Implements Ogre::RenderSystem.

◆ fireDeviceEvent()

void Ogre::D3D9RenderSystem::fireDeviceEvent ( D3D9Device device,
const String name 
)

Fires a device related event.

◆ flushUAVs()

virtual void Ogre::RenderSystem::flushUAVs ( void  )
pure virtualinherited

Forces to take effect all the queued UAV binding requests.

See also
_queueBindUAV. You don't need to call this if you're going to set the render target next.

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

◆ getActiveD3D9Device()

static IDirect3DDevice9 * Ogre::D3D9RenderSystem::getActiveD3D9Device ( )
static

◆ getActiveD3D9DeviceIfExists()

static IDirect3DDevice9 * Ogre::D3D9RenderSystem::getActiveD3D9DeviceIfExists ( )
static

◆ getCapabilities()

const RenderSystemCapabilities * Ogre::RenderSystem::getCapabilities ( void  ) const
inlineinherited

Gets the capabilities of the render system.

◆ getColourVertexElementType()

VertexElementType Ogre::D3D9RenderSystem::getColourVertexElementType ( ) const
virtual

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

Implements Ogre::RenderSystem.

◆ getConfigOptions()

ConfigOptionMap & Ogre::D3D9RenderSystem::getConfigOptions ( )
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.

Implements Ogre::RenderSystem.

◆ getCustomAttribute()

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

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::D3D11RenderSystem.

◆ getDebugShaders()

bool Ogre::RenderSystem::getDebugShaders ( void  ) const
inlineinherited

◆ getDeviceManager()

static D3D9DeviceManager * Ogre::D3D9RenderSystem::getDeviceManager ( )
static

◆ getDirect3D9()

static IDirect3D9 * Ogre::D3D9RenderSystem::getDirect3D9 ( )
static

◆ getDisplayMonitorCount()

unsigned int Ogre::D3D9RenderSystem::getDisplayMonitorCount ( ) const
virtual

Gets the number of display monitors.

See also
Root::getDisplayMonitorCount

Implements Ogre::RenderSystem.

◆ getDriverVersion()

virtual const DriverVersion & Ogre::RenderSystem::getDriverVersion ( void  ) const
inlinevirtualinherited

Returns the driver version.

◆ getErrorDescription()

String Ogre::D3D9RenderSystem::getErrorDescription ( long  errorNumber) const
virtual

Returns a description of an error code.

Implements Ogre::RenderSystem.

◆ getFriendlyName()

const String & Ogre::D3D9RenderSystem::getFriendlyName ( ) const
virtual

Returns the friendly name of the render system.

Implements Ogre::RenderSystem.

◆ getGlobalInstanceVertexBuffer()

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

Returns the global instance vertex buffer.

◆ getGlobalInstanceVertexBufferVertexDeclaration()

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

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

◆ getGlobalNumberOfInstances()

size_t Ogre::RenderSystem::getGlobalNumberOfInstances ( ) const
inherited

Gets the global number of instances.

◆ getHorizontalTexelOffset()

Real Ogre::D3D9RenderSystem::getHorizontalTexelOffset ( )
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.

Implements Ogre::RenderSystem.

◆ getInvertVertexWinding()

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

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

reflections)

See also
RenderSystem::setInvertVertexWinding

◆ getMaximumDepthInputValue()

Real Ogre::D3D9RenderSystem::getMaximumDepthInputValue ( )
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

Implements Ogre::RenderSystem.

◆ getMinimumDepthInputValue()

Real Ogre::D3D9RenderSystem::getMinimumDepthInputValue ( )
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

Implements Ogre::RenderSystem.

◆ getMultiheadUse()

MultiheadUseType Ogre::D3D9RenderSystem::getMultiheadUse ( ) const
inline

Returns how multihead should be activated.

◆ getMutableCapabilities()

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

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()

const String & Ogre::D3D9RenderSystem::getName ( ) const
virtual

Returns the name of the rendering system.

Implements Ogre::RenderSystem.

◆ getNativeShadingLanguageVersion()

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

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

◆ getPixelFormatToShaderType()

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

◆ getRenderSystemEvents()

virtual const StringVector & Ogre::RenderSystem::getRenderSystemEvents ( void  ) const
inlinevirtualinherited

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

See also
RenderSystem::addListener

◆ getRenderTarget()

virtual RenderTarget * Ogre::RenderSystem::getRenderTarget ( const String name)
virtualinherited

Returns a pointer to the render target with the passed name, or NULL if that render target cannot be found.

◆ getRenderTargetIterator()

virtual RenderTargetIterator Ogre::RenderSystem::getRenderTargetIterator ( void  )
inlinevirtualinherited

Returns a specialised MapIterator over all render targets attached to the RenderSystem.

◆ getResourceCreationDevice()

static IDirect3DDevice9 * Ogre::D3D9RenderSystem::getResourceCreationDevice ( UINT  index)
static

◆ getResourceCreationDeviceCount()

static UINT Ogre::D3D9RenderSystem::getResourceCreationDeviceCount ( )
static

◆ getResourceManager()

static D3D9ResourceManager * Ogre::D3D9RenderSystem::getResourceManager ( )
static

◆ getRSDepthRange()

virtual Real Ogre::RenderSystem::getRSDepthRange ( void  ) const
inlinevirtualinherited

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

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

◆ getSharedListener()

static Listener * Ogre::RenderSystem::getSharedListener ( void  )
staticinherited

Retrieve a pointer to the current shared render system listener.

◆ getStencilBufferParams()

const StencilParams & Ogre::RenderSystem::getStencilBufferParams ( void  ) const
inlineinherited

◆ getVaoManager()

VaoManager * Ogre::RenderSystem::getVaoManager ( void  ) const
inlineinherited

◆ getVerticalTexelOffset()

Real Ogre::D3D9RenderSystem::getVerticalTexelOffset ( )
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.

Implements Ogre::RenderSystem.

◆ getWBufferEnabled()

bool Ogre::RenderSystem::getWBufferEnabled ( void  ) const
inherited

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

◆ hasAnisotropicMipMapFilter()

virtual bool Ogre::D3D9RenderSystem::hasAnisotropicMipMapFilter ( ) const
inlinevirtual

Determines if the system has anisotropic mip map filter support.

Implements Ogre::RenderSystem.

◆ initConfigOptions()

virtual void Ogre::D3D9RenderSystem::initConfigOptions ( )
virtual

◆ initGPUProfiling()

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

◆ IsActiveDeviceLost()

bool Ogre::D3D9RenderSystem::IsActiveDeviceLost ( )

◆ isDirectX9Ex()

static bool Ogre::D3D9RenderSystem::isDirectX9Ex ( )
inlinestatic

Tells whether the system is initialized with DirectX 9Ex driver Read more in http://msdn.microsoft.com/en-us/library/windows/desktop/ee890072(v=vs.85).aspx.

◆ isGpuProgramBound()

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

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

◆ isStaticBufferLockable()

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

Reimplemented from Ogre::RenderSystem.

◆ markProfileEvent()

virtual void Ogre::D3D9RenderSystem::markProfileEvent ( const String eventName)
virtual

Marks an instantaneous event for graphics profilers.


This is equivalent to calling

See also
beginProfileEvent and
endProfileEvent back to back.

Implements Ogre::RenderSystem.

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
void  
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

array operator new, with debug line info

◆ postExtraThreadsStarted()

void Ogre::D3D9RenderSystem::postExtraThreadsStarted ( )
virtual

Implements Ogre::RenderSystem.

◆ preExtraThreadsStarted()

void Ogre::D3D9RenderSystem::preExtraThreadsStarted ( )
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.

Implements Ogre::RenderSystem.

◆ queueBindUAV() [1/2]

virtual void Ogre::RenderSystem::queueBindUAV ( uint32  slot,
TexturePtr  texture,
ResourceAccess::ResourceAccess  access = ResourceAccess::ReadWrite,
int32  mipmapLevel = 0,
int32  textureArrayIndex = 0,
PixelFormat  pixelFormat = PF_UNKNOWN 
)
pure virtualinherited

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.

Parameters
bindPointThe buffer binding location for shader access. For OpenGL this must be unique and is not related to the texture binding point.
accessThe texture access privileges given to the shader.
mipmapLevelThe texture mipmap level to use.
textureArrayIndexThe index of the texture array to use. If texture is not a texture array, set to 0.
formatTexture format to be read in by shader. This may be different than the bound texture format. Will be the same is left as PF_UNKNOWN

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

◆ queueBindUAV() [2/2]

virtual void Ogre::RenderSystem::queueBindUAV ( uint32  slot,
UavBufferPacked buffer,
ResourceAccess::ResourceAccess  access = ResourceAccess::ReadWrite,
size_t  offset = 0,
size_t  sizeBytes = 0 
)
pure virtualinherited

See other overload.

The slots are shared with the textures'

Parameters
offsetOffset to bind, in bytes
sizeBytesSize to bind, in bytes. Use 0 to bind until the end of the buffer.

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

◆ registerThread()

void Ogre::D3D9RenderSystem::registerThread ( )
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.

Implements Ogre::RenderSystem.

◆ reinitialise()

void Ogre::D3D9RenderSystem::reinitialise ( )
virtual

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

Implements Ogre::RenderSystem.

◆ removeListener()

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

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

◆ resetClipPlanes()

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

Clears the user clipping region.

◆ setAmbientLight()

void Ogre::D3D9RenderSystem::setAmbientLight ( float  r,
float  g,
float  b 
)

◆ setClipPlane()

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

◆ setClipPlanes()

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

Sets the user clipping region.

◆ setConfigOption()

void Ogre::D3D9RenderSystem::setConfigOption ( const String name,
const String value 
)
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.

Implements Ogre::RenderSystem.

◆ setCurrentPassIterationCount()

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

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)
inherited

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.

◆ setDepthBufferFor()

virtual void Ogre::RenderSystem::setDepthBufferFor ( RenderTarget renderTarget,
bool  exactMatch 
)
virtualinherited

Retrieves an existing DepthBuffer or creates a new one suited for the given RenderTarget and sets it.

Remarks
RenderTarget's pool ID is respected.
See also
RenderTarget::setDepthBufferPool()

◆ setDeriveDepthBias()

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

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::D3D9RenderSystem::setDrawBuffer ( ColourBufferType  colourBuffer)
virtual

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 from Ogre::RenderSystem.

◆ setGlobalInstanceVertexBuffer()

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

Sets the global instance vertex buffer.

◆ setGlobalInstanceVertexBufferVertexDeclaration()

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

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

◆ setGlobalNumberOfInstances()

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

Sets the global number of instances.

◆ setInvertVertexWinding()

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

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

◆ setScissorTest()

void Ogre::D3D9RenderSystem::setScissorTest ( bool  enabled,
size_t  left = 0,
size_t  top = 0,
size_t  right = 800,
size_t  bottom = 600 
)

◆ setSharedListener()

static void Ogre::RenderSystem::setSharedListener ( Listener listener)
staticinherited

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.

◆ setStencilBufferParams() [1/2]

void Ogre::D3D9RenderSystem::setStencilBufferParams ( CompareFunction  func = CMPF_ALWAYS_PASS,
uint32  refValue = 0,
uint32  compareMask = 0xFFFFFFFF,
uint32  writeMask = 0xFFFFFFFF,
StencilOperation  stencilFailOp = SOP_KEEP,
StencilOperation  depthFailOp = SOP_KEEP,
StencilOperation  passOp = SOP_KEEP,
bool  twoSidedOperation = false,
bool  readBackAsTexture = false 
)

◆ setStencilBufferParams() [2/2]

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

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::D3D11RenderSystem, Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, and Ogre::MetalRenderSystem.

◆ setStencilCheckEnabled()

void Ogre::D3D9RenderSystem::setStencilCheckEnabled ( bool  enabled)

◆ setUavStartingSlot()

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

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 queueBindUAV( 0, ... ) can goes to slot 3 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.

Reimplemented in Ogre::GL3PlusRenderSystem.

◆ setVertexBufferBinding() [1/2]

void Ogre::D3D9RenderSystem::setVertexBufferBinding ( VertexBufferBinding *  binding)

◆ setVertexBufferBinding() [2/2]

void Ogre::D3D9RenderSystem::setVertexBufferBinding ( VertexBufferBinding *  binding,
size_t  numberOfInstances,
bool  useGlobalInstancingVertexBufferIsAvailable,
bool  indexesUsed 
)

◆ setVertexDeclaration() [1/2]

void Ogre::D3D9RenderSystem::setVertexDeclaration ( VertexDeclaration *  decl)

◆ setVertexDeclaration() [2/2]

void Ogre::D3D9RenderSystem::setVertexDeclaration ( VertexDeclaration *  decl,
bool  useGlobalInstancingVertexBufferIsAvailable 
)

◆ setWBufferEnabled()

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

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()

void Ogre::D3D9RenderSystem::shutdown ( )
virtual

Shutdown the renderer and cleanup resources.

Reimplemented from Ogre::RenderSystem.

◆ unbindGpuProgram()

void Ogre::D3D9RenderSystem::unbindGpuProgram ( GpuProgramType  gptype)

◆ unregisterThread()

void Ogre::D3D9RenderSystem::unregisterThread ( )
virtual

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

See also
RenderSystem::registerThread

Implements Ogre::RenderSystem.

◆ updateCompositorManager()

virtual void Ogre::RenderSystem::updateCompositorManager ( CompositorManager2 compositorManager,
SceneManagerEnumerator sceneManagers,
HlmsManager hlmsManager 
)
virtualinherited

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)
virtualinherited

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()

String Ogre::D3D9RenderSystem::validateConfigOptions ( )
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.

Implements Ogre::RenderSystem.

Friends And Related Symbol Documentation

◆ D3D9Device

◆ D3D9DeviceManager


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