OGRE
2.2.4
Object-Oriented Graphics Rendering Engine
|
Implementation of DirectX9 as a rendering system. More...
#include <OgreD3D9RenderSystem.h>
Public Types | |
enum | MultiheadUseType { mutAuto, mutYes, mutNo } |
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. More... | |
void | _addMetrics (const Metrics &newMetrics) |
void | _beginFrame () |
Signifies the beginning of a frame, i.e. More... | |
virtual void | _beginFrameOnce (void) |
Signifies the beginning of the main frame. More... | |
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. More... | |
void | _cleanupDepthBuffers (IDirect3DDevice9 *creator) |
void | _cleanupDepthBuffers (IDirect3DSurface9 *manualSurface) |
This function does NOT override RenderSystem::_cleanupDepthBuffers(bool) functionality. More... | |
void | _cleanupDepthBuffers (void) |
virtual void | _clearStateAndFlushCommandBuffer (void) |
On D3D11 calls ClearState followed by Flush(). More... | |
virtual void | _convertOpenVrProjectionMatrix (const Matrix4 &matrix, Matrix4 &dest) |
Converts an OpenVR projection matrix to have the proper depth range and reverse Z settings. More... | |
virtual void | _convertProjectionMatrix (const Matrix4 &matrix, Matrix4 &dest) |
Converts a uniform projection matrix to suitable for this render system. More... | |
DepthBuffer * | _createDepthBufferFor (RenderTarget *renderTarget) |
RenderWindow * | _createRenderWindow (const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0) |
Creates a new rendering window. More... | |
bool | _createRenderWindows (const RenderWindowDescriptionList &renderWindowDescriptions, RenderWindowList &createdWindows) |
Creates multiple rendering windows. More... | |
virtual bool | _createRenderWindows (const RenderWindowDescriptionList &renderWindowDescriptions, WindowList &createdWindows) |
Creates multiple rendering windows. More... | |
void | _dereferenceSharedDepthBuffer (TextureGpu *depthBuffer) |
Releases the reference count on a shared depth buffer. More... | |
virtual void | _descriptorSetSamplerCreated (DescriptorSetSampler *newSet) |
virtual void | _descriptorSetSamplerDestroyed (DescriptorSetSampler *set) |
virtual void | _descriptorSetTexture2Created (DescriptorSetTexture2 *newSet) |
virtual void | _descriptorSetTexture2Destroyed (DescriptorSetTexture2 *set) |
virtual void | _descriptorSetTextureCreated (DescriptorSetTexture *newSet) |
virtual void | _descriptorSetTextureDestroyed (DescriptorSetTexture *set) |
virtual void | _descriptorSetUavCreated (DescriptorSetUav *newSet) |
virtual void | _descriptorSetUavDestroyed (DescriptorSetUav *set) |
void | _disableTextureUnit (size_t texUnit) |
virtual void | _dispatch (const HlmsComputePso &pso)=0 |
void | _endFrame () |
Ends rendering of a frame to the current viewport. More... | |
virtual void | _endFrameOnce (void) |
Called once per frame, regardless of how many active workspaces there are. More... | |
virtual void | _executeResourceTransition (ResourceTransition *resTransition) |
Viewport & | _getCurrentRenderViewport (void) |
virtual const String & | _getDefaultViewportMaterialScheme (void) const |
Returns the default material scheme used by the render system. More... | |
D3DFORMAT | _getDepthStencilFormatFor (D3DFORMAT fmt) |
Check which depthStencil formats can be used with a certain pixel format, and return the best suited. More... | |
virtual void | _hlmsBlendblockCreated (HlmsBlendblock *newBlock) |
virtual void | _hlmsBlendblockDestroyed (HlmsBlendblock *block) |
virtual void | _hlmsComputePipelineStateObjectCreated (HlmsComputePso *newPso) |
virtual void | _hlmsComputePipelineStateObjectDestroyed (HlmsComputePso *newPso) |
virtual void | _hlmsMacroblockCreated (HlmsMacroblock *newBlock) |
virtual void | _hlmsMacroblockDestroyed (HlmsMacroblock *block) |
virtual void | _hlmsPipelineStateObjectCreated (HlmsPso *newPso) |
virtual void | _hlmsPipelineStateObjectDestroyed (HlmsPso *pso) |
virtual void | _hlmsSamplerblockCreated (HlmsSamplerblock *newBlock) |
virtual void | _hlmsSamplerblockDestroyed (HlmsSamplerblock *block) |
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). More... | |
virtual void | _makeRsProjectionMatrix (const Matrix4 &matrix, Matrix4 &dest, Real nearPlane, Real farPlane, ProjectionType projectionType) |
Takes a regular source projection matrix in range [-1; 1] and converts it to a projection matrix in 'dest' with reverse Z range [1; 0]. More... | |
virtual RenderSystemContext * | _pauseFrame (void) |
Pause rendering for a frame. More... | |
void | _render (const RenderOperation &op) |
virtual void | _render (const v1::RenderOperation &op) |
Render something to the active viewport. More... | |
virtual void | _render (const CbDrawCallIndexed *cmd)=0 |
Renders the VAO. Assumes _setVertexArrayObject has already been called. More... | |
virtual void | _render (const CbDrawCallStrip *cmd)=0 |
virtual void | _render (const v1::CbDrawCallIndexed *cmd)=0 |
Renders a V1 RenderOperation. Assumes _setRenderOperation has already been called. More... | |
virtual void | _render (const v1::CbDrawCallStrip *cmd)=0 |
virtual void | _renderEmulated (const CbDrawCallIndexed *cmd)=0 |
virtual void | _renderEmulated (const CbDrawCallStrip *cmd)=0 |
virtual void | _renderEmulatedNoBaseInstance (const CbDrawCallIndexed *cmd) |
virtual void | _renderEmulatedNoBaseInstance (const CbDrawCallStrip *cmd) |
virtual void | _renderNoBaseInstance (const v1::CbDrawCallIndexed *cmd) |
virtual void | _renderNoBaseInstance (const v1::CbDrawCallStrip *cmd) |
void | _resetMetrics () |
virtual void | _resourceTransitionCreated (ResourceTransition *resTransition) |
virtual void | _resourceTransitionDestroyed (ResourceTransition *resTransition) |
virtual void | _resumeFrame (RenderSystemContext *context) |
Resume rendering for a frame. More... | |
void | _setAlphaRejectSettings (CompareFunction func, unsigned char value, bool alphaToCoverage) |
virtual void | _setBindingType (TextureUnitState::BindingType bindigType) |
Set texture unit binding type. More... | |
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) More... | |
void | _setCullingMode (CullingMode mode) |
virtual void | _setCurrentDeviceFromTexture (TextureGpu *texture)=0 |
Because Ogre doesn't (yet) have the notion of a 'device' or 'GL context', this function lets Ogre know which device should be used by providing a texture. More... | |
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, TextureGpu *tex) |
virtual void | _setHlmsBlendblock (const HlmsBlendblock *blendblock) |
virtual void | _setHlmsMacroblock (const HlmsMacroblock *macroblock) |
virtual void | _setHlmsSamplerblock (uint8 texUnit, const HlmsSamplerblock *Samplerblock)=0 |
HlmsSamplerblock. More... | |
virtual void | _setIndirectBuffer (IndirectBufferPacked *indirectBuffer)=0 |
virtual void | _setPipelineStateObject (const HlmsPso *pso) |
HlmsPso More... | |
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. More... | |
void | _setPointSpritesEnabled (bool enabled) |
Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points. More... | |
void | _setPolygonMode (PolygonMode level) |
virtual void | _setProgramsFromHlms (const HlmsCache *hlmsCache) |
void | _setProjectionMatrix (const Matrix4 &m) |
Sets the projection transform matrix. More... | |
virtual void | _setRenderOperation (const v1::CbRenderOp *cmd)=0 |
void | _setRenderTarget (RenderTarget *target) |
Set current render target to target, enabling its GL context if needed. More... | |
virtual void | _setSamplers (uint32 slotStart, const DescriptorSetSampler *set)=0 |
virtual void | _setSamplersCS (uint32 slotStart, const DescriptorSetSampler *set)=0 |
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. More... | |
virtual void | _setTessellationDomainTexture (size_t unit, TextureGpu *tex) |
virtual void | _setTessellationHullTexture (size_t unit, TextureGpu *tex) |
void | _setTexture (size_t unit, bool enabled, const TexturePtr &texPtr) |
virtual void | _setTexture (size_t unit, TextureGpu *texPtr)=0 |
Sets the texture to bind to a given texture unit. More... | |
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. More... | |
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. More... | |
void | _setTextureCoordSet (size_t unit, size_t index) |
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. More... | |
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. More... | |
virtual void | _setTextures (uint32 slotStart, const DescriptorSetTexture *set, uint32 hazardousTexIdx)=0 |
virtual void | _setTextures (uint32 slotStart, const DescriptorSetTexture2 *set)=0 |
virtual void | _setTexturesCS (uint32 slotStart, const DescriptorSetTexture *set)=0 |
virtual void | _setTexturesCS (uint32 slotStart, const DescriptorSetTexture2 *set)=0 |
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. More... | |
virtual void | _setUavCS (uint32 slotStart, const DescriptorSetUav *set)=0 |
virtual void | _setVertexArrayObject (const VertexArrayObject *vao)=0 |
Part of the low level rendering interface. More... | |
void | _setVertexTexture (size_t unit, const TexturePtr &tex) |
virtual void | _setVertexTexture (size_t unit, TextureGpu *tex) |
Binds a texture to a vertex, geometry, compute, tessellation hull or tessellation domain sampler. More... | |
void | _setViewMatrix (const Matrix4 &m) |
Sets the view transform matrix. More... | |
void | _setViewport (Viewport *vp) |
virtual void | _setWorldMatrices (const Matrix4 *m, unsigned short count) |
Sets multiple world matrices (vertex blending). More... | |
void | _setWorldMatrix (const Matrix4 &m) |
Sets the world transform matrix. More... | |
virtual void | _startLegacyV1Rendering (void) |
May override the current VertexArrayObject! More... | |
void | _update (void) |
Called once per frame, regardless of how many active workspaces there are. More... | |
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) More... | |
virtual void | addClipPlane (const Plane &p) |
Add a user clipping plane. More... | |
virtual void | addClipPlane (Real A, Real B, Real C, Real D) |
Add a user clipping plane. More... | |
virtual void | addListener (Listener *l) |
Adds a listener to the custom events that this render system can raise. More... | |
virtual bool | areFixedFunctionLightsInViewSpace () const |
Are fixed-function lights provided in view space? Affects optimisation. More... | |
virtual void | beginGPUSampleProfile (const String &name, uint32 *hashCache)=0 |
virtual void | beginProfileEvent (const String &eventName) |
This marks the beginning of an event for GPU profiling. More... | |
virtual void | beginRenderPassDescriptor (RenderPassDescriptor *desc, TextureGpu *anyTarget, uint8 mipLevel, const Vector4 *viewportSizes, const Vector4 *scissors, uint32 numViewports, bool overlaysEnabled, bool warnIfRtvWasFlushed) |
When the descriptor is set to Load clear, two possible things may happen: More... | |
void | bindGpuProgram (GpuProgram *prg) |
See RenderSystem. More... | |
void | bindGpuProgramParameters (GpuProgramType gptype, GpuProgramParametersSharedPtr params, uint16 variabilityMask) |
See RenderSystem. More... | |
void | bindGpuProgramPassIterationParameters (GpuProgramType gptype) |
Only binds Gpu program parameters used for passes that have more than one iteration rendering. More... | |
virtual bool | checkExtension (const String &ext) const |
Checks for the presense of an API-specific extension (eg. Vulkan, GL) More... | |
void | clearFrameBuffer (unsigned int buffers, const ColourValue &colour=ColourValue::Black, Real depth=1.0f, unsigned short stencil=0) |
virtual void | clearFrameBuffer (RenderPassDescriptor *renderPassDesc, TextureGpu *anyTarget, uint8 mipLevel)=0 |
Immediately clears the whole frame buffer on the selected RenderPassDescriptor. More... | |
virtual void | convertColourValue (const ColourValue &colour, uint32 *pDest) |
Generates a packed data version of the passed in ColourValue suitable for use as with this RenderSystem. More... | |
HardwareOcclusionQuery * | createHardwareOcclusionQuery () |
Create an object for performing hardware occlusion queries. More... | |
virtual MultiRenderTarget * | createMultiRenderTarget (const String &name) |
virtual RenderPassDescriptor * | createRenderPassDescriptor (void)=0 |
void | createStereoDriver (const NameValuePairList *miscParams) |
Creates a bridge to the Direct3D stereo driver implementation. More... | |
virtual void | deinitGPUProfiling (void)=0 |
virtual void | destroyHardwareOcclusionQuery (HardwareOcclusionQuery *hq) |
Destroy a hardware occlusion query object. More... | |
void | destroyRenderPassDescriptor (RenderPassDescriptor *renderPassDesc) |
void | destroyRenderTarget (const String &name) |
virtual void | destroyRenderWindow (Window *window) |
Destroys a render window. More... | |
virtual RenderTarget * | detachRenderTarget (const String &name) |
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. More... | |
void | enableClipPlane (ushort index, bool enable) |
virtual void | endGPUSampleProfile (const String &name)=0 |
virtual void | endProfileEvent (void) |
Ends the currently active GPU profiling event. More... | |
virtual void | endRenderPassDescriptor (void) |
virtual void | executeRenderPassDescriptorDelayedActions (void) |
Metal needs to delay RenderCommand creation to the last minute, because we can't issue blit operations (e.g. More... | |
void | fireDeviceEvent (D3D9Device *device, const String &name) |
Fires a device related event. More... | |
virtual void | flushCommands (void)=0 |
virtual void | flushUAVs (void)=0 |
Forces to take effect all the queued UAV binding requests. More... | |
const RenderSystemCapabilities * | getCapabilities (void) const |
Gets the capabilities of the render system. More... | |
VertexElementType | getColourVertexElementType () const |
Get the native VertexElementType for a compact 32-bit colour value for this rendersystem. More... | |
ConfigOptionMap & | getConfigOptions () |
Returns the details of this API's configuration options. More... | |
RenderPassDescriptor * | getCurrentPassDescriptor (void) |
Viewport * | getCurrentRenderViewports (void) |
virtual void | getCustomAttribute (const String &name, void *pData) |
Gets a custom (maybe platform-specific) attribute. More... | |
bool | getDebugShaders (void) const |
virtual TextureGpu * | getDepthBufferFor (TextureGpu *colourTexture, uint16 poolId, bool preferDepthTexture, PixelFormatGpu depthBufferFormat) |
unsigned int | getDisplayMonitorCount () const |
Gets the number of display monitors. More... | |
virtual const DriverVersion & | getDriverVersion (void) const |
Returns the driver version. More... | |
String | getErrorDescription (long errorNumber) const |
Returns a description of an error code. More... | |
const String & | getFriendlyName () const |
Returns the friendly name of the render system. More... | |
v1::HardwareVertexBufferSharedPtr | getGlobalInstanceVertexBuffer () const |
Returns the global instance vertex buffer. More... | |
v1::VertexDeclaration * | getGlobalInstanceVertexBufferVertexDeclaration () const |
Gets vertex declaration for the global vertex buffer for the global instancing. More... | |
size_t | getGlobalNumberOfInstances () const |
Gets the global number of instances. More... | |
Real | getHorizontalTexelOffset () |
Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this rendersystem. More... | |
virtual bool | getInvertVertexWinding (void) const |
Indicates whether or not the vertex windings set will be inverted for the current render (e.g. More... | |
uint32 | getMaxBoundViewports (void) |
Real | getMaximumDepthInputValue () |
Gets the maximum (farthest) depth value to be used when rendering using identity transforms. More... | |
const Metrics & | getMetrics () const |
Real | getMinimumDepthInputValue () |
Gets the minimum (closest) depth value to be used when rendering using identity transforms. More... | |
MultiheadUseType | getMultiheadUse () const |
Returns how multihead should be activated. More... | |
RenderSystemCapabilities * | getMutableCapabilities () |
Get a pointer to the current capabilities being used by the RenderSystem. More... | |
const String & | getName () const |
Returns the name of the rendering system. More... | |
uint16 | getNativeShadingLanguageVersion () const |
Gets the native shading language version for this render system. More... | |
virtual const PixelFormatToShaderType * | getPixelFormatToShaderType (void) const =0 |
virtual const StringVector & | getRenderSystemEvents (void) const |
Gets a list of the rendersystem specific events that this rendersystem can raise. More... | |
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;. More... | |
const StencilParams & | getStencilBufferParams (void) const |
TextureGpuManager * | getTextureGpuManager (void) const |
VaoManager * | getVaoManager (void) const |
Real | getVerticalTexelOffset () |
Returns the vertical texel offset value required for mapping texel origins to pixel origins in this rendersystem. More... | |
bool | getWBufferEnabled (void) const |
Returns true if the renderer will try to use W-buffers when available. More... | |
virtual bool | hasAnisotropicMipMapFilter () const |
Determines if the system has anisotropic mip map filter support. More... | |
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. More... | |
bool | isReverseDepth (void) const |
virtual bool | isStaticBufferLockable () const |
virtual void | markProfileEvent (const String &eventName) |
Marks an instantaneous event for graphics profilers. More... | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new More... | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info More... | |
void * | operator new[] (size_t sz) |
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. More... | |
void | queueBindUAVs (const DescriptorSetUav *descSetUav) |
Queues the binding of an UAV to the binding point/slot. More... | |
void | registerThread () |
Register the an additional thread which may make calls to rendersystem-related objects. More... | |
void | reinitialise () |
Restart the renderer (normally following a change in settings). More... | |
virtual void | removeListener (Listener *l) |
Remove a listener to the custom events that this render system can raise. More... | |
virtual void | resetClipPlanes () |
Clears the user clipping region. More... | |
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. More... | |
void | setConfigOption (const String &name, const String &value) |
Sets an option for this API. More... | |
virtual void | setCurrentPassIterationCount (const size_t count) |
set the current multi pass count value. More... | |
void | setDebugShaders (bool bDebugShaders) |
Instructs the RenderSystem to compile shaders without optimizations and with debug information, for easier debugging on APIs that support it. More... | |
virtual void | setDeriveDepthBias (bool derive, float baseValue=0.0f, float multiplier=0.0f, float slopeScale=0.0f) |
Tell the render system whether to derive a depth bias on its own based on the values passed to it in setCurrentPassIterationCount. More... | |
virtual bool | setDrawBuffer (ColourBufferType colourBuffer) |
Sets the colour buffer that the render system will to draw. More... | |
void | setGlobalInstanceVertexBuffer (const v1::HardwareVertexBufferSharedPtr &val) |
Sets the global instance vertex buffer. More... | |
void | setGlobalInstanceVertexBufferVertexDeclaration (v1::VertexDeclaration *val) |
Sets vertex declaration for the global vertex buffer for the global instancing. More... | |
void | setGlobalNumberOfInstances (const size_t val) |
Sets the global number of instances. More... | |
void | setInvertVertexWinding (bool invert) |
Sets whether or not vertex windings set should be inverted; this can be important for rendering reflections. More... | |
void | setMetricsRecordingEnabled (bool bEnable) |
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. More... | |
void | setStencilCheckEnabled (bool enabled) |
void | setUavStartingSlot (uint32 startingSlot) |
In Direct3D11, UAV & RenderTargets share the same slots. More... | |
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. More... | |
void | shutdown () |
Shutdown the renderer and cleanup resources. More... | |
void | unbindGpuProgram (GpuProgramType gptype) |
See RenderSystem. More... | |
void | unregisterThread () |
Unregister an additional thread which may make calls to rendersystem-related objects. More... | |
virtual void | updateCompositorManager (CompositorManager2 *compositorManager) |
This gives the renderer a chance to perform the compositor update in a special way. More... | |
virtual void | useCustomRenderSystemCapabilities (RenderSystemCapabilities *capabilities) |
Force the render system to use the special capabilities. More... | |
String | validateConfigOptions () |
Validates the options set for the rendering system, returning a message if there are problems. More... | |
virtual bool | validateDevice (bool forceDeviceElection=false) |
Some render systems have moments when GPU device is temporarily unavailable, for example when D3D11 device is lost, or when iOS app is in background, etc. More... | |
virtual SampleDescription | validateSampleDescription (const SampleDescription &sampleDesc, PixelFormatGpu format) |
Returns supported sample description for requested FSAA mode, with graceful downgrading. More... | |
Static Public Member Functions | |
static IDirect3DDevice9 * | getActiveD3D9Device () |
static IDirect3DDevice9 * | getActiveD3D9DeviceIfExists () |
static D3D9DeviceManager * | getDeviceManager () |
static IDirect3D9 * | getDirect3D9 () |
static IDirect3DDevice9 * | getResourceCreationDevice (UINT index) |
static UINT | getResourceCreationDeviceCount () |
static D3D9ResourceManager * | getResourceManager () |
static Listener * | getSharedListener (void) |
Retrieve a pointer to the current shared render system listener. More... | |
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. More... | |
static CompareFunction | reverseCompareFunction (CompareFunction depthFunc) |
Reverts the compare order e.g. More... | |
static void | setSharedListener (Listener *listener) |
Sets shared listener. More... | |
Friends | |
class | D3D9Device |
class | D3D9DeviceManager |
Implementation of DirectX9 as a rendering system.
Ogre::D3D9RenderSystem::D3D9RenderSystem | ( | HINSTANCE | hInstance | ) |
Ogre::D3D9RenderSystem::~D3D9RenderSystem | ( | ) |
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
|
inherited |
|
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.
|
virtualinherited |
Signifies the beginning of the main frame.
i.e. will only be called once per frame, not per viewport
Reimplemented in Ogre::MetalRenderSystem.
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.
void Ogre::D3D9RenderSystem::_cleanupDepthBuffers | ( | IDirect3DDevice9 * | creator | ) |
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.
manualSurface | Depth buffer surface to compare against. Shouldn't be null |
|
inherited |
|
virtualinherited |
On D3D11 calls ClearState followed by Flush().
On GL3+ it calls glFlush
Do not call this function while inside rendering internals, as it will clear the device state, thus leaving it inconsistent with what we think it is set to.
Reimplemented in Ogre::D3D11RenderSystem.
|
virtualinherited |
Converts an OpenVR projection matrix to have the proper depth range and reverse Z settings.
matrix | |
dest |
Reimplemented in Ogre::GL3PlusRenderSystem.
|
virtualinherited |
Converts a uniform projection matrix to suitable for this render system.
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::NULLRenderSystem.
DepthBuffer* Ogre::D3D9RenderSystem::_createDepthBufferFor | ( | RenderTarget * | renderTarget | ) |
|
virtual |
Creates a new rendering window.
name | The name of the window. Used in other methods later like setRenderTarget and getRenderTarget. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
width | The width of the new window. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
height | The height of the new window. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fullScreen | Specify true to make the window full screen without borders, title bar or menu bar. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
miscParams | A 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:
|
Implements Ogre::RenderSystem.
bool Ogre::D3D9RenderSystem::_createRenderWindows | ( | const RenderWindowDescriptionList & | renderWindowDescriptions, |
RenderWindowList & | createdWindows | ||
) |
Creates multiple rendering windows.
renderWindowDescriptions | Array 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. |
createdWindows | This array will hold the created render windows. |
|
virtualinherited |
Creates multiple rendering windows.
renderWindowDescriptions | Array 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. |
createdWindows | This array will hold the created render windows. |
Reimplemented in Ogre::GL3PlusRenderSystem.
|
inherited |
Releases the reference count on a shared depth buffer.
Does nothing if input is not a shared depth buffer.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::D3D11RenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::D3D11RenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
void Ogre::D3D9RenderSystem::_disableTextureUnit | ( | size_t | texUnit | ) |
|
pure virtualinherited |
|
virtual |
Ends rendering of a frame to the current viewport.
Implements Ogre::RenderSystem.
|
virtualinherited |
Called once per frame, regardless of how many active workspaces there are.
Gets called AFTER all RenderWindows have been swapped.
Reimplemented in Ogre::MetalRenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem.
|
inlineinherited |
|
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.
Referenced by Ogre::CompositorPassSceneDef::CompositorPassSceneDef().
D3DFORMAT Ogre::D3D9RenderSystem::_getDepthStencilFormatFor | ( | D3DFORMAT | fmt | ) |
Check which depthStencil formats can be used with a certain pixel format, and return the best suited.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, and Ogre::D3D11RenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, and Ogre::D3D11RenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, and Ogre::D3D11RenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, and Ogre::D3D11RenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
virtual |
Start up the renderer using the settings selected (Or the defaults if none have been selected).
autoCreateWindow | If true, creates a render window automatically, based on settings chosen so far. This saves an extra call to _createRenderWindow for the main render window. |
windowTitle | Sets the app window title |
Reimplemented from Ogre::RenderSystem.
|
virtualinherited |
Takes a regular source projection matrix in range [-1; 1] and converts it to a projection matrix in 'dest' with reverse Z range [1; 0].
_convertProjectionMatrix does the same thing but is more generic. This version assumes a standard projection matrix (i.e. not oblique) to maximize precision
matrix | |
dest | |
nearPlane | |
farPlane | |
projectionType |
Reimplemented in Ogre::GL3PlusRenderSystem.
|
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.
void Ogre::D3D9RenderSystem::_render | ( | const 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
op | A rendering operation instance, which contains details of the operation to be performed. |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
pure virtualinherited |
Renders the VAO. Assumes _setVertexArrayObject has already been called.
Implemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
pure virtualinherited |
|
pure virtualinherited |
Renders a V1 RenderOperation. Assumes _setRenderOperation has already been called.
Implemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.
|
inherited |
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem.
|
inlinevirtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem.
|
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.
context | the render system context, as returned by _pauseFrame |
Reimplemented from Ogre::RenderSystem.
void Ogre::D3D9RenderSystem::_setAlphaRejectSettings | ( | CompareFunction | func, |
unsigned char | value, | ||
bool | alphaToCoverage | ||
) |
|
virtualinherited |
Set texture unit binding type.
Reimplemented in Ogre::D3D11RenderSystem.
void Ogre::D3D9RenderSystem::_setColourBufferWriteEnabled | ( | bool | red, |
bool | green, | ||
bool | blue, | ||
bool | alpha | ||
) |
|
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::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
void Ogre::D3D9RenderSystem::_setCullingMode | ( | CullingMode | mode | ) |
|
pure virtualinherited |
Because Ogre doesn't (yet) have the notion of a 'device' or 'GL context', this function lets Ogre know which device should be used by providing a texture.
texture | Cannot be null. |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
void Ogre::D3D9RenderSystem::_setDepthBias | ( | float | constantBias, |
float | slopeScaleBias | ||
) |
void Ogre::D3D9RenderSystem::_setDepthBufferCheckEnabled | ( | bool | enabled = true | ) |
void Ogre::D3D9RenderSystem::_setDepthBufferFunction | ( | CompareFunction | func = CMPF_LESS_EQUAL | ) |
void Ogre::D3D9RenderSystem::_setDepthBufferParams | ( | bool | depthTest = true , |
bool | depthWrite = true , |
||
CompareFunction | depthFunction = CMPF_LESS_EQUAL |
||
) |
void Ogre::D3D9RenderSystem::_setDepthBufferWriteEnabled | ( | bool | enabled = true | ) |
|
virtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.
|
virtual |
|
virtual |
|
pure virtualinherited |
This function MUST be called after _setTexture, not before. Otherwise not all APIs may see the change.
Implemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
pure virtualinherited |
|
virtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
virtual |
Sets the size of points and how they are attenuated with distance.
Implements Ogre::RenderSystem.
|
virtual |
Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) or plain points.
enabled | True enables point sprites, false returns to normal point rendering. |
Implements Ogre::RenderSystem.
void Ogre::D3D9RenderSystem::_setPolygonMode | ( | PolygonMode | level | ) |
|
virtual |
|
virtual |
Sets the projection transform matrix.
Implements Ogre::RenderSystem.
|
pure virtualinherited |
void Ogre::D3D9RenderSystem::_setRenderTarget | ( | RenderTarget * | target | ) |
Set current render target to target, enabling its GL context if needed.
|
pure virtualinherited |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
pure virtualinherited |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
void Ogre::D3D9RenderSystem::_setSceneBlending | ( | SceneBlendFactor | sourceFactor, |
SceneBlendFactor | destFactor, | ||
SceneBlendOperation | op | ||
) |
void Ogre::D3D9RenderSystem::_setSeparateSceneBlending | ( | SceneBlendFactor | sourceFactor, |
SceneBlendFactor | destFactor, | ||
SceneBlendFactor | sourceFactorAlpha, | ||
SceneBlendFactor | destFactorAlpha, | ||
SceneBlendOperation | op, | ||
SceneBlendOperation | alphaOp | ||
) |
|
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.
ambient | The amount of ambient (sourceless and directionless) light an object reflects. Affected by the colour/amount of ambient light in the scene. |
diffuse | The amount of light from directed sources that is reflected (affected by colour/amount of point, directed and spot light sources) |
specular | The amount of specular light reflected. This is also affected by directed light sources but represents the colour at the highlights of the object. |
emissive | The 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. |
shininess | A 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). |
tracking | A 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.
|
virtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.
|
virtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.
void Ogre::D3D9RenderSystem::_setTexture | ( | size_t | unit, |
bool | enabled, | ||
const TexturePtr & | 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.
unit | The index of the texture unit to modify. Multitexturing hardware can support multiple units (see RenderSystemCapabilites::getNumTextureUnits) |
enabled | Boolean to turn the unit on/off |
texPtr | Pointer to the texture to use. |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
void Ogre::D3D9RenderSystem::_setTextureAddressingMode | ( | size_t | stage, |
const TextureUnitState::UVWAddressingMode & | uvw | ||
) |
|
virtual |
Sets the texture blend modes from a TextureUnitState record.
Meant for use internally only - apps should use the Material and TextureUnitState classes.
unit | Texture unit as above |
bm | Details of the blending mode |
Implements Ogre::RenderSystem.
void Ogre::D3D9RenderSystem::_setTextureBorderColour | ( | size_t | stage, |
const ColourValue & | colour | ||
) |
|
virtual |
Sets a method for automatically calculating texture coordinates for a stage.
Should not be used by apps - for use by Ogre only.
unit | Texture unit as above |
m | Calculation method to use |
frustum | Optional Frustum param, only used for projective effects |
Implements Ogre::RenderSystem.
void Ogre::D3D9RenderSystem::_setTextureCoordSet | ( | size_t | unit, |
size_t | index | ||
) |
void Ogre::D3D9RenderSystem::_setTextureLayerAnisotropy | ( | size_t | unit, |
unsigned int | maxAnisotropy | ||
) |
|
virtual |
Sets the texture coordinate transformation matrix for a texture unit.
unit | Texture unit to affect |
xform | The 4x4 matrix |
Implements Ogre::RenderSystem.
void Ogre::D3D9RenderSystem::_setTextureMipmapBias | ( | size_t | unit, |
float | bias | ||
) |
|
virtualinherited |
Notify the rendersystem that it should adjust texture projection to be relative to a different origin.
|
pure virtualinherited |
slotStart | |
set | |
hazardousTexIdx | When hazardousTexIdx < set->mTextures.size(); it means that we need to check if set->mTextures[hazardousTexIdx] is not the same as the currently bound RTT. |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
pure virtualinherited |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
pure virtualinherited |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
pure virtualinherited |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
void Ogre::D3D9RenderSystem::_setTextureUnitCompareEnabled | ( | size_t | unit, |
bool | compare | ||
) |
void Ogre::D3D9RenderSystem::_setTextureUnitCompareFunction | ( | size_t | unit, |
CompareFunction | function | ||
) |
void Ogre::D3D9RenderSystem::_setTextureUnitFiltering | ( | size_t | unit, |
FilterType | ftype, | ||
FilterOptions | filter | ||
) |
|
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.
|
pure virtualinherited |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
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.
Implemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
void Ogre::D3D9RenderSystem::_setVertexTexture | ( | size_t | unit, |
const TexturePtr & | tex | ||
) |
|
virtualinherited |
Binds a texture to a vertex, geometry, compute, tessellation hull or tessellation domain sampler.
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::D3D11RenderSystem.
|
virtual |
Sets the view transform matrix.
Implements Ogre::RenderSystem.
void Ogre::D3D9RenderSystem::_setViewport | ( | Viewport * | vp | ) |
|
virtualinherited |
Sets multiple world matrices (vertex blending).
|
virtual |
Sets the world transform matrix.
Implements Ogre::RenderSystem.
|
inlinevirtualinherited |
May override the current VertexArrayObject!
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.
|
inherited |
Called once per frame, regardless of how many active workspaces there are.
|
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.
|
virtualinherited |
Add a user clipping plane.
Add a user clipping plane.
|
virtualinherited |
Adds a listener to the custom events that this render system can raise.
|
inlinevirtualinherited |
Are fixed-function lights provided in view space? Affects optimisation.
Reimplemented in Ogre::GL3PlusRenderSystem, and Ogre::GLES2RenderSystem.
References Ogre::TVC_NONE.
|
virtual |
This marks the beginning of an event for GPU profiling.
Implements Ogre::RenderSystem.
|
virtualinherited |
When the descriptor is set to Load clear, two possible things may happen:
desc | |
anyTarget | Contains the first valid texture in mRenderPassDesc, to be used for reference (e.g. width, height, etc). Could be colour, depth, stencil, or nullptr. |
mipLevel | Mip at which anyTarget is bound |
viewportSize | |
warnIfRtvWasFlushed | See CompositorPassDef::mWarnIfRtvWasFlushed |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
void Ogre::D3D9RenderSystem::bindGpuProgram | ( | GpuProgram * | prg | ) |
See RenderSystem.
|
virtual |
See RenderSystem.
Implements Ogre::RenderSystem.
|
virtual |
Only binds Gpu program parameters used for passes that have more than one iteration rendering.
Implements Ogre::RenderSystem.
|
inlinevirtualinherited |
Checks for the presense of an API-specific extension (eg. Vulkan, GL)
Reimplemented in Ogre::GLES2RenderSystem.
void Ogre::D3D9RenderSystem::clearFrameBuffer | ( | unsigned int | buffers, |
const ColourValue & | colour = ColourValue::Black , |
||
Real | depth = 1.0f , |
||
unsigned short | stencil = 0 |
||
) |
|
pure virtualinherited |
Immediately clears the whole frame buffer on the selected RenderPassDescriptor.
Prefer clearing using the LoadAction semantics in the RenderPassDescriptor. This function is provided for two reasons:
renderPassDesc | RenderPassDescriptor filled with LoadActions set to clear and StoreActions set to Store. |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
virtualinherited |
Generates a packed data version of the passed in ColourValue suitable for use as with this RenderSystem.
colour | The colour to convert |
pDest | Pointer to location to put the result. |
|
virtual |
Create an object for performing hardware occlusion queries.
Implements Ogre::RenderSystem.
|
virtual |
|
pure virtualinherited |
Implemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
void Ogre::D3D9RenderSystem::createStereoDriver | ( | const NameValuePairList * | miscParams | ) |
Creates a bridge to the Direct3D stereo driver implementation.
|
pure virtualinherited |
|
virtualinherited |
Destroy a hardware occlusion query object.
|
inherited |
void Ogre::D3D9RenderSystem::destroyRenderTarget | ( | const String & | name | ) |
|
virtualinherited |
Destroys a render window.
|
virtual |
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.
void Ogre::D3D9RenderSystem::enableClipPlane | ( | ushort | index, |
bool | enable | ||
) |
|
pure virtualinherited |
|
virtual |
Ends the currently active GPU profiling event.
Implements Ogre::RenderSystem.
|
virtualinherited |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
virtualinherited |
Metal needs to delay RenderCommand creation to the last minute, because we can't issue blit operations (e.g.
buffer copies) which a lot of v1 code relies on otherwise the RenderCommand gets canceled. Even if we were to get rid of v1 operations, the user may want to hook listeners for _renderPhase02 and perform forbidden operations. Therefore it's easier to split the process done in beginRenderPassDescriptor in two steps (beginRenderPassDescriptor and executeRenderPassDescriptorDelayedActions) for Metal.
Reimplemented in Ogre::MetalRenderSystem.
void Ogre::D3D9RenderSystem::fireDeviceEvent | ( | D3D9Device * | device, |
const String & | name | ||
) |
Fires a device related event.
|
pure virtualinherited |
Implemented in Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
pure virtualinherited |
Forces to take effect all the queued UAV binding requests.
Implemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
static |
|
static |
|
inlineinherited |
Gets the capabilities of the render system.
|
virtual |
Get the native VertexElementType for a compact 32-bit colour value for this rendersystem.
Implements Ogre::RenderSystem.
|
virtual |
Returns the details of this API's configuration options.
Implements Ogre::RenderSystem.
|
inlineinherited |
|
inlineinherited |
|
virtualinherited |
Gets a custom (maybe platform-specific) attribute.
name | The name of the attribute. |
pData | Pointer to memory of the right kind of structure to receive the info. |
Reimplemented in Ogre::D3D11RenderSystem.
|
inlineinherited |
|
virtualinherited |
|
static |
|
static |
|
virtual |
Gets the number of display monitors.
Implements Ogre::RenderSystem.
|
inlinevirtualinherited |
Returns the driver version.
|
virtual |
Returns a description of an error code.
Implements Ogre::RenderSystem.
|
virtual |
Returns the friendly name of the render system.
Implements Ogre::RenderSystem.
|
inherited |
Returns the global instance vertex buffer.
|
inherited |
Gets vertex declaration for the global vertex buffer for the global instancing.
|
inherited |
Gets the global number of instances.
|
virtual |
Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this rendersystem.
Implements Ogre::RenderSystem.
|
virtualinherited |
Indicates whether or not the vertex windings set will be inverted for the current render (e.g.
reflections)
|
inlineinherited |
|
virtual |
Gets the maximum (farthest) depth value to be used when rendering using identity transforms.
Implements Ogre::RenderSystem.
|
inherited |
|
virtual |
Gets the minimum (closest) depth value to be used when rendering using identity transforms.
Implements Ogre::RenderSystem.
|
inline |
Returns how multihead should be activated.
|
inlineinherited |
Get a pointer to the current capabilities being used by the RenderSystem.
|
virtual |
Returns the name of the rendering system.
Implements Ogre::RenderSystem.
|
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
|
pure virtualinherited |
Implemented in Ogre::D3D11RenderSystem, Ogre::MetalRenderSystem, and Ogre::NULLRenderSystem.
|
inlinevirtualinherited |
Gets a list of the rendersystem specific events that this rendersystem can raise.
|
static |
|
static |
|
static |
|
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;.
Note OpenGL may behave like D3D11, and thus we'll return 1.0f too. This is decided at runtime, not at compile time.
Reimplemented in Ogre::GL3PlusRenderSystem.
|
staticinherited |
Retrieve a pointer to the current shared render system listener.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
virtual |
Returns the vertical texel offset value required for mapping texel origins to pixel origins in this rendersystem.
Implements Ogre::RenderSystem.
|
inherited |
Returns true if the renderer will try to use W-buffers when available.
|
inlinevirtual |
Determines if the system has anisotropic mip map filter support.
Implements Ogre::RenderSystem.
|
virtual |
|
pure virtualinherited |
bool Ogre::D3D9RenderSystem::IsActiveDeviceLost | ( | ) |
|
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.
|
virtualinherited |
Returns whether or not a Gpu program of the given type is currently bound.
|
inlineinherited |
References OGRE_MAX_TEXTURE_LAYERS.
|
inlinevirtual |
Reimplemented from Ogre::RenderSystem.
|
virtual |
Marks an instantaneous event for graphics profilers.
This is equivalent to calling
Implements Ogre::RenderSystem.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
|
inlineinherited |
|
inlineinherited |
placement operator new
|
inlineinherited |
array operator new, with debug line info
|
inlineinherited |
|
virtual |
Implements Ogre::RenderSystem.
|
virtual |
Tell the rendersystem to perform any prep tasks it needs to directly before other threads which might access the rendering API are registered.
Implements Ogre::RenderSystem.
|
inherited |
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.
OpenGL however, does not make this distinction. Hence once we switch back to 3D rendering, we need to restore UAVs set via queueBindUAV.
|
virtual |
Register the an additional thread which may make calls to rendersystem-related objects.
Implements Ogre::RenderSystem.
|
virtual |
Restart the renderer (normally following a change in settings).
Implements Ogre::RenderSystem.
|
virtualinherited |
Remove a listener to the custom events that this render system can raise.
|
virtualinherited |
Clears the user clipping region.
|
staticinherited |
Reverts the compare order e.g.
greater_equal becomes less_equal Used by reverse depth
depthFunc |
void Ogre::D3D9RenderSystem::setAmbientLight | ( | float | r, |
float | g, | ||
float | b | ||
) |
|
virtualinherited |
Sets the user clipping region.
Sets an option for this API.
name | The name of the option to alter. |
value | The value to set the option to. |
Implements Ogre::RenderSystem.
|
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.
count | Number of times to render the current state. |
|
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.
|
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
derive | True to tell the RS to derive this automatically |
baseValue | The base value to which the multiplier should be added |
multiplier | The amount of depth bias to apply per iteration |
slopeScale | The constant slope scale bias for completeness |
|
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.
colourBuffer | Specifies the colour buffer that will be drawn into. |
Reimplemented from Ogre::RenderSystem.
|
inherited |
Sets the global instance vertex buffer.
|
inherited |
Sets vertex declaration for the global vertex buffer for the global instancing.
|
inherited |
Sets the global number of instances.
|
inherited |
Sets whether or not vertex windings set should be inverted; this can be important for rendering reflections.
|
inherited |
void Ogre::D3D9RenderSystem::setScissorTest | ( | bool | enabled, |
size_t | left = 0 , |
||
size_t | top = 0 , |
||
size_t | right = 800 , |
||
size_t | bottom = 600 |
||
) |
|
staticinherited |
Sets shared listener.
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 |
||
) |
|
virtualinherited |
This method allows you to set all the stencil buffer parameters in one call.
(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.
refValue | The reference value used in the comparison (dynamic) |
stencilParams | The static parameters that involve more expensive state changes. Ogre dev implementors note: Should check if the stencilParams are different from before |
Reimplemented in Ogre::GL3PlusRenderSystem, Ogre::GLES2RenderSystem, Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
void Ogre::D3D9RenderSystem::setStencilCheckEnabled | ( | bool | enabled | ) |
|
inherited |
In Direct3D11, UAV & RenderTargets share the same slots.
Because of this, we enforce the same behavior on all RenderSystems. An unfortunate consequence is that if you attach an MRT consisting of 3 RTs; the UAV needs to set at slot 3; not slot 0. This setting lets you tell Ogre the starting slot; so queueBindUAVs( descSet ) goes from slot 3 onwards if you call setUavStartingSlot( 3 )
startingSlot | Default value: 1. |
void Ogre::D3D9RenderSystem::setVertexBufferBinding | ( | VertexBufferBinding * | binding | ) |
void Ogre::D3D9RenderSystem::setVertexBufferBinding | ( | VertexBufferBinding * | binding, |
size_t | numberOfInstances, | ||
bool | useGlobalInstancingVertexBufferIsAvailable, | ||
bool | indexesUsed | ||
) |
void Ogre::D3D9RenderSystem::setVertexDeclaration | ( | VertexDeclaration * | decl | ) |
void Ogre::D3D9RenderSystem::setVertexDeclaration | ( | VertexDeclaration * | decl, |
bool | useGlobalInstancingVertexBufferIsAvailable | ||
) |
|
inherited |
Sets whether or not W-buffers are enabled if they are available for this renderer.
enabled | If 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. |
|
virtual |
Shutdown the renderer and cleanup resources.
Reimplemented from Ogre::RenderSystem.
void Ogre::D3D9RenderSystem::unbindGpuProgram | ( | GpuProgramType | gptype | ) |
See RenderSystem.
|
virtual |
Unregister an additional thread which may make calls to rendersystem-related objects.
Implements Ogre::RenderSystem.
|
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.
|
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)
capabilities | has to be a subset of the real capabilities and the caller is responsible for deallocating capabilities. |
|
virtual |
Validates the options set for the rendering system, returning a message if there are problems.
Implements Ogre::RenderSystem.
|
inlinevirtualinherited |
Some render systems have moments when GPU device is temporarily unavailable, for example when D3D11 device is lost, or when iOS app is in background, etc.
Reimplemented in Ogre::D3D11RenderSystem.
References Ogre::RenderWindowDescription::height, Ogre::RenderWindowDescription::miscParams, Ogre::RenderWindowDescription::name, and Ogre::RenderWindowDescription::width.
|
virtualinherited |
Returns supported sample description for requested FSAA mode, with graceful downgrading.
Reimplemented in Ogre::D3D11RenderSystem, and Ogre::MetalRenderSystem.
|
friend |
|
friend |