OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OgreD3D11RenderSystem.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2011 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __D3D11RENDERSYSTEM_H__
29 #define __D3D11RENDERSYSTEM_H__
30 
31 #include "OgreD3D11Prerequisites.h"
32 #include "OgreRenderSystem.h"
33 #include "OgreD3D11Device.h"
34 #include "OgreD3D11Mappings.h"
35 #include "OgreFixedFuncState.h"
38 
39 namespace Ogre
40 {
41 #define MAX_LIGHTS 8
42 
43  class D3D11DriverList;
44  class D3D11Driver;
45 
50  {
51  private:
52 
53  // an enum to define the driver type of d3d11
55  {
56  DT_HARDWARE, // GPU based
57  DT_SOFTWARE, // microsoft original (slow) software driver
58  DT_WARP // microsoft new (faster) software driver
59 
60  };
61 
62  OGRE_D3D11_DRIVER_TYPE mDriverType; // d3d11 driver type
63 
64 
65 
66 
68  //int mpD3D;
71 
72  // Stored options
74 
76  HINSTANCE mhInstance;
77 
86 
88 
89 
90 
92  void refreshD3DSettings(void);
93  void refreshFSAAOptions(void);
94  void freeDevice(void);
95 
96 // inline bool compareDecls( D3DVERTEXELEMENT9* pDecl1, D3DVERTEXELEMENT9* pDecl2, size_t size );
97 
98 
99  void initInputDevices(void);
100  void processInputDevices(void);
101 
103  DWORD _getCurrentAnisotropy(size_t unit);
105  bool _checkMultiSampleQuality(UINT SampleCount, UINT *outQuality, DXGI_FORMAT format);
106 
110 
112 
117 
118 
123 
127  bool checkVertexTextureFormats(void);
128 
129 
130  CompareFunction mSceneAlphaRejectFunc; // should be merged with - mBlendDesc
131  unsigned char mSceneAlphaRejectValue; // should be merged with - mBlendDesc
133 
134  D3D11_BLEND_DESC mBlendDesc;
135 
136  D3D11_RASTERIZER_DESC mRasterizerDesc;
137 
139  D3D11_DEPTH_STENCIL_DESC mDepthStencilDesc;
140 
142 
146 
147  D3D11_RECT mScissorRect;
148 
149 
153 
154 
155  ID3D11BlendState * mBoundBlendState;
156  ID3D11RasterizerState * mBoundRasterizer;
157  ID3D11DepthStencilState * mBoundDepthStencilState;
160 
161  ID3D11ShaderResourceView * mBoundTextures[OGRE_MAX_TEXTURE_LAYERS];
163 
164 
167  {
169  //D3D11Mappings::eD3DTexType texType;
172  size_t coordIndex;
176  const Frustum *frustum;
177 
179 
181  ID3D11ShaderResourceView *pTex;
182  D3D11_SAMPLER_DESC samplerDesc;
183  D3D11_SAMPLER_DESC currentSamplerDesc;
184  //ID3D11SamplerState * pSampler;
185  bool used;
187 
188 
189  // What follows is a set of duplicated lists just to make it
190  // easier to deal with lost devices
191 
194 
196  // List of additional windows after the first (swap chains)
198 
200 
201 
202  IDXGIFactory1* mpDXGIFactory;
203  protected:
204  void setClipPlanesImpl(const PlaneList& clipPlanes);
205  public:
206  // constructor
207  D3D11RenderSystem( HINSTANCE hInstance );
208  // destructor
210 
211  virtual void initConfigOptions(void);
212 
213  // Overridden RenderSystem functions
216  RenderWindow* _initialise( bool autoCreateWindow, const String& windowTitle = "OGRE Render Window" );
218  RenderWindow* _createRenderWindow(const String &name, unsigned int width, unsigned int height,
219  bool fullScreen, const NameValuePairList *miscParams = 0);
220 
222  RenderTexture * createRenderTexture( const String & name, unsigned int width, unsigned int height,
223  TextureType texType = TEX_TYPE_2D, PixelFormat internalFormat = PF_X8R8G8B8,
224  const NameValuePairList *miscParams = 0 );
225 
227  virtual MultiRenderTarget * createMultiRenderTarget(const String & name);
228 
229  const String& getName(void) const;
230  // Low-level overridden members
231  void setConfigOption( const String &name, const String &value );
232  void reinitialise();
233  void shutdown();
234  void setAmbientLight( float r, float g, float b );
235  void setShadingType( ShadeOptions so );
236  void setLightingEnabled( bool enabled );
237  void destroyRenderTarget(const String& name);
239  void setStencilCheckEnabled(bool enabled);
241  uint32 refValue = 0, uint32 mask = 0xFFFFFFFF,
242  StencilOperation stencilFailOp = SOP_KEEP,
243  StencilOperation depthFailOp = SOP_KEEP,
244  StencilOperation passOp = SOP_KEEP,
245  bool twoSidedOperation = false);
246  void setNormaliseNormals(bool normalise);
247 
248  virtual String getErrorDescription(long errorNumber) const;
249 
250  // Low-level overridden members, mainly for internal use
251  void _useLights(const LightList& lights, unsigned short limit);
252  void _setWorldMatrix( const Matrix4 &m );
253  void _setViewMatrix( const Matrix4 &m );
254  void _setProjectionMatrix( const Matrix4 &m );
255  void _setSurfaceParams( const ColourValue &ambient, const ColourValue &diffuse, const ColourValue &specular, const ColourValue &emissive, Real shininess, TrackVertexColourType tracking );
256  void _setPointSpritesEnabled(bool enabled);
257  void _setPointParameters(Real size, bool attenuationEnabled,
258  Real constant, Real linear, Real quadratic, Real minSize, Real maxSize);
259  void _setTexture(size_t unit, bool enabled, const TexturePtr &texPtr);
260  void _setVertexTexture(size_t unit, const TexturePtr& tex);
261  void _disableTextureUnit(size_t texUnit);
262  void _setTextureCoordSet( size_t unit, size_t index );
263  void _setTextureCoordCalculation(size_t unit, TexCoordCalcMethod m,
264  const Frustum* frustum = 0);
265  void _setTextureBlendMode( size_t unit, const LayerBlendModeEx& bm );
266  void _setTextureAddressingMode(size_t stage, const TextureUnitState::UVWAddressingMode& uvw);
267  void _setTextureBorderColour(size_t stage, const ColourValue& colour);
268  void _setTextureMipmapBias(size_t unit, float bias);
269  void _setTextureMatrix( size_t unit, const Matrix4 &xform );
271  void _setSeparateSceneBlending(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendFactor sourceFactorAlpha,
272  SceneBlendFactor destFactorAlpha, SceneBlendOperation op = SBO_ADD, SceneBlendOperation alphaOp = SBO_ADD);
273  void _setAlphaRejectSettings( CompareFunction func, unsigned char value, bool alphaToCoverage );
274  void _setViewport( Viewport *vp );
275  void _beginFrame(void);
276  void _endFrame(void);
277  void _setCullingMode( CullingMode mode );
278  void _setDepthBufferParams( bool depthTest = true, bool depthWrite = true, CompareFunction depthFunction = CMPF_LESS_EQUAL );
279  void _setDepthBufferCheckEnabled( bool enabled = true );
280  void _setColourBufferWriteEnabled(bool red, bool green, bool blue, bool alpha);
281  void _setDepthBufferWriteEnabled(bool enabled = true);
283  void _setDepthBias(float constantBias, float slopeScaleBias);
284  void _setFog( FogMode mode = FOG_NONE, const ColourValue& colour = ColourValue::White, Real expDensity = 1.0, Real linearStart = 0.0, Real linearEnd = 1.0 );
285  void _convertProjectionMatrix(const Matrix4& matrix,
286  Matrix4& dest, bool forGpuProgram = false);
287  void _makeProjectionMatrix(const Radian& fovy, Real aspect, Real nearPlane, Real farPlane,
288  Matrix4& dest, bool forGpuProgram = false);
289  void _makeProjectionMatrix(Real left, Real right, Real bottom, Real top, Real nearPlane,
290  Real farPlane, Matrix4& dest, bool forGpuProgram = false);
291  void _makeOrthoMatrix(const Radian& fovy, Real aspect, Real nearPlane, Real farPlane,
292  Matrix4& dest, bool forGpuProgram = false);
293  void _applyObliqueDepthProjection(Matrix4& matrix, const Plane& plane,
294  bool forGpuProgram);
295  void _setPolygonMode(PolygonMode level);
296  void _setTextureUnitFiltering(size_t unit, FilterType ftype, FilterOptions filter);
297  void _setTextureLayerAnisotropy(size_t unit, unsigned int maxAnisotropy);
300  void _render(const RenderOperation& op);
304  void bindGpuProgram(GpuProgram* prg);
308  void unbindGpuProgram(GpuProgramType gptype);
317 
318  void setScissorTest(bool enabled, size_t left = 0, size_t top = 0, size_t right = 800, size_t bottom = 600);
319  void clearFrameBuffer(unsigned int buffers,
320  const ColourValue& colour = ColourValue::Black,
321  Real depth = 1.0f, unsigned short stencil = 0);
322  void setClipPlane (ushort index, Real A, Real B, Real C, Real D);
323  void enableClipPlane (ushort index, bool enable);
329  void registerThread();
330  void unregisterThread();
331  void preExtraThreadsStarted();
333 
337  void _setRenderTarget(RenderTarget *target);
338 
342  bool _checkTextureFilteringSupported(TextureType ttype, PixelFormat format, int usage);
343 
344  void determineFSAASettings(uint fsaa, const String& fsaaHint, DXGI_FORMAT format, DXGI_SAMPLE_DESC* outFSAASettings);
345 
347  unsigned int getDisplayMonitorCount() const {return 1;} //todo
348 
349  };
350 }
351 #endif
Manages the target rendering window.
OGRE_D3D11_DRIVER_TYPE mDriverType
unsigned int getDisplayMonitorCount() const
Gets the number of display monitors.
void _endFrame(void)
Ends rendering of a frame to the current viewport.
A 'canvas' which can receive the results of a rendering operation.
void setStencilCheckEnabled(bool enabled)
Turns stencil buffer checking on or off.
void _setFog(FogMode mode=FOG_NONE, const ColourValue &colour=ColourValue::White, Real expDensity=1.0, Real linearStart=0.0, Real linearEnd=1.0)
Sets the fogging mode for future geometry.
D3D11Device mDevice
Direct3D.
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:78
void setClipPlane(ushort index, Real A, Real B, Real C, Real D)
float Real
Software floating point type.
unsigned int uint32
Definition: OgrePlatform.h:246
VertexElementType getColourVertexElementType(void) const
Get the native VertexElementType for a compact 32-bit colour value for this rendersystem.
void _setTextureLayerAnisotropy(size_t unit, unsigned int maxAnisotropy)
Sets the maximal anisotropy for the specified texture unit.
struct Ogre::D3D11RenderSystem::sD3DTextureStageDesc mTexStageDesc[OGRE_MAX_TEXTURE_LAYERS]
Records the state of all the vertex buffer bindings required to provide a vertex declaration with the...
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:524
Defines a plane in 3D space.
Definition: OgrePlane.h:61
FogMode
Fog modes.
Definition: OgreCommon.h:122
bool checkVertexTextureFormats(void)
Leave the stencil buffer unchanged.
FixedFuncEmuShaderManager mFixedFuncEmuShaderManager
DWORD _getCurrentAnisotropy(size_t unit)
return anisotropy level
void refreshD3DSettings(void)
void unregisterThread()
Unregister an additional thread which may make calls to rendersystem-related objects.
void _convertProjectionMatrix(const Matrix4 &matrix, Matrix4 &dest, bool forGpuProgram=false)
Converts a uniform projection matrix to suitable for this render system.
This class represents a RenderTarget that renders to a Texture.
Class representing colour.
GpuProgramType
Enumerates the types of programs which can run on the GPU.
void _setTextureMipmapBias(size_t unit, float bias)
Sets the mipmap bias value for a given texture unit.
static const ColourValue White
void _setDepthBufferParams(bool depthTest=true, bool depthWrite=true, CompareFunction depthFunction=CMPF_LESS_EQUAL)
Sets the mode of operation for depth buffer tests from this point onwards.
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
Definition: OgreFrustum.h:84
D3D11_RASTERIZER_DESC mRasterizerDesc
void _setTextureUnitFiltering(size_t unit, FilterType ftype, FilterOptions filter)
Sets a single filter for a given texture unit.
void _setRenderTarget(RenderTarget *target)
Set current render target to target, enabling its GL context if needed.
void registerThread()
Register the an additional thread which may make calls to rendersystem-related objects.
Defines a program which runs on the GPU such as a vertex or fragment program.
bool mUseNVPerfHUD
NVPerfHUD allowed?
TexCoordCalcMethod
Enum describing the ways to generate texture coordinates.
bool mPerStageConstantSupport
Per-stage constant support? (not in main caps since D3D specific & minor)
D3D11HLSLProgramFactory * mHLSLProgramFactory
D3D11RenderWindow * mPrimaryWindow
Primary window, the one used to create the device.
ID3D11ShaderResourceView * mBoundTextures[OGRE_MAX_TEXTURE_LAYERS]
void _setAlphaRejectSettings(CompareFunction func, unsigned char value, bool alphaToCoverage)
Sets the global alpha rejection approach for future renders.
FilterType
Definition: OgreCommon.h:91
void refreshFSAAOptions(void)
void bindGpuProgram(GpuProgram *prg)
See RenderSystem.
D3D11GpuProgramManager * mGpuProgramManager
void convertVertexShaderCaps(RenderSystemCapabilities *rsc) const
virtual String getErrorDescription(long errorNumber) const
Returns a description of an error code.
virtual MultiRenderTarget * createMultiRenderTarget(const String &name)
Create a MultiRenderTarget, which is a render target that renders to multiple RenderTextures at once...
bool _checkTextureFilteringSupported(TextureType ttype, PixelFormat format, int usage)
Check whether or not filtering is supported for the precise texture format requested with the given u...
SceneBlendFactor
Blending factors for manually blending objects with the scene.
Real getVerticalTexelOffset(void)
Returns the vertical texel offset value required for mapping texel origins to pixel origins in this r...
Real getMaximumDepthInputValue(void)
Gets the maximum (farthest) depth value to be used when rendering using identity transforms.
ID3D11DepthStencilState * mBoundDepthStencilState
void determineFSAASettings(uint fsaa, const String &fsaaHint, DXGI_FORMAT format, DXGI_SAMPLE_DESC *outFSAASettings)
ID3D11RasterizerState * mBoundRasterizer
void bindGpuProgramPassIterationParameters(GpuProgramType gptype)
See RenderSystem.
String validateConfigOptions(void)
Validates the options set for the rendering system, returning a message if there are problems...
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:136
void setStencilBufferParams(CompareFunction func=CMPF_ALWAYS_PASS, uint32 refValue=0, uint32 mask=0xFFFFFFFF, StencilOperation stencilFailOp=SOP_KEEP, StencilOperation depthFailOp=SOP_KEEP, StencilOperation passOp=SOP_KEEP, bool twoSidedOperation=false)
Determines if this system supports hardware accelerated stencil buffer.
const String & getName(void) const
Returns the name of the rendering system.
No fog. Duh.
Definition: OgreCommon.h:125
This class represents a render target that renders to multiple RenderTextures at once.
void unbindGpuProgram(GpuProgramType gptype)
See RenderSystem.
ID3D11SamplerState * mBoundSamplerStates[OGRE_MAX_TEXTURE_LAYERS]
size_t coordIndex
which texCoordIndex to use
This is a abstract class that that provides the interface for the query class for hardware occlusion...
void _setTextureBlendMode(size_t unit, const LayerBlendModeEx &bm)
Sets the texture blend modes from a TextureUnitState record.
void _setDepthBufferWriteEnabled(bool enabled=true)
Sets whether or not the depth buffer is updated after a pixel write.
vector< Plane >::type PlaneList
Definition: OgrePlane.h:160
#define OGRE_MAX_TEXTURE_LAYERS
Define max number of texture layers allowed per pass on any card.
Definition: OgreConfig.h:70
RenderSystemCapabilities * createRenderSystemCapabilities() const
Internal method for populating the capabilities structure.
ID3D11BlendState * mBoundBlendState
void setConfigOption(const String &name, const String &value)
Sets an option for this API.
void _setSceneBlending(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendOperation op=SBO_ADD)
Sets the global blending factors for combining subsequent renders with the existing frame contents...
void reinitialise()
Restart the renderer (normally following a change in settings).
ShadeOptions
Light shading modes.
Definition: OgreCommon.h:114
D3D11DriverList * mDriverList
List of D3D drivers installed (video cards)
void _setTexture(size_t unit, bool enabled, const TexturePtr &texPtr)
Sets the texture to bind to a given texture unit.
bool _checkMultiSampleQuality(UINT SampleCount, UINT *outQuality, DXGI_FORMAT format)
check if a FSAA is supported
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 (...
FixedFuncPrograms::FixedFuncProgramsParameters mFixedFuncProgramsParameters
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.
Class defining a fixed function state.
PixelFormat
The pixel format used for images, textures, and render surfaces.
32-bit pixel format, 8 bits for red, 8 bits for green, 8 bits for blue like PF_A8R8G8B8, but alpha will get discarded
void _render(const RenderOperation &op)
Render something to the active viewport.
void _setCullingMode(CullingMode mode)
Sets the culling mode for the render system based on the 'vertex winding'.
Texture addressing mode for each texture coordinate.
map< String, ConfigOption >::type ConfigOptionMap
HardwareOcclusionQuery * createHardwareOcclusionQuery(void)
Create an object for performing hardware occlusion queries.
void setNormaliseNormals(bool normalise)
Sets whether or not normals are to be automatically normalised.
SecondaryWindowList mSecondaryWindows
void _setPointSpritesEnabled(bool enabled)
Sets whether or not rendering points using OT_POINT_LIST will render point sprites (textured quads) o...
void _setSeparateSceneBlending(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendFactor sourceFactorAlpha, SceneBlendFactor destFactorAlpha, SceneBlendOperation op=SBO_ADD, SceneBlendOperation alphaOp=SBO_ADD)
Sets the global blending factors for combining subsequent renders with the existing frame contents...
void _disableTextureUnit(size_t texUnit)
Turns off a texture unit.
TexCoordCalcMethod autoTexCoordType
type of auto tex. calc. used
Specialisation of SharedPtr to allow SharedPtr to be assigned to TexturePtr.
Definition: OgreTexture.h:440
void _setViewMatrix(const Matrix4 &m)
Sets the view transform matrix.
void _setTextureCoordCalculation(size_t unit, TexCoordCalcMethod m, const Frustum *frustum=0)
Sets a method for automatically calculating texture coordinates for a stage.
Real getHorizontalTexelOffset(void)
Returns the horizontal texel offset value required for mapping texel origins to pixel origins in this...
VertexElementType
Vertex element type, used to identify the base types of the vertex contents.
void _setProjectionMatrix(const Matrix4 &m)
Sets the projection transform matrix.
D3D11HardwareBufferManagerBase as a Singleton.
void setClipPlanesImpl(const PlaneList &clipPlanes)
Internal method used to set the underlying clip planes when needed.
void setScissorTest(bool enabled, size_t left=0, size_t top=0, size_t right=800, size_t bottom=600)
Sets the 'scissor region' ie the region of the target in which rendering can take place...
HINSTANCE mhInstance
instance
void _setPolygonMode(PolygonMode level)
Sets how to rasterise triangles, as points, wireframe or solid polys.
void _setColourBufferWriteEnabled(bool red, bool green, bool blue, bool alpha)
Sets whether or not colour buffer writing is enabled, and for which channels.
const Frustum * frustum
Frustum, used if the above is projection.
void _setWorldMatrix(const Matrix4 &m)
Sets the world transform matrix.
unsigned short ushort
void setLightingEnabled(bool enabled)
Sets whether or not dynamic lighting is enabled.
void setShadingType(ShadeOptions so)
Sets the type of light shading required (default = Gouraud).
void preExtraThreadsStarted()
Tell the rendersystem to perform any prep tasks it needs to directly before other threads which might...
void _setVertexTexture(size_t unit, const TexturePtr &tex)
Binds a texture to a vertex sampler.
void convertGeometryShaderCaps(RenderSystemCapabilities *rsc) const
D3D11_DEPTH_STENCIL_DESC mDepthStencilDesc
An abstraction of a viewport, i.e.
Definition: OgreViewport.h:56
'New' rendering operation using vertex buffers.
void shutdown()
Shutdown the renderer and cleanup resources.
This class declares the format of a set of vertex inputs, which can be issued to the rendering API th...
structure holding texture unit settings for every stage
D3D11HLSLProgram * mBoundVertexProgram
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.
void _setTextureAddressingMode(size_t stage, const TextureUnitState::UVWAddressingMode &uvw)
Sets the texture addressing mode for a texture unit.
ConfigOptionMap & getConfigOptions(void)
Returns the details of this API's configuration options.
virtual void initConfigOptions(void)
void enableClipPlane(ushort index, bool enable)
void _setDepthBufferFunction(CompareFunction func=CMPF_LESS_EQUAL)
Sets the comparison function for the depth buffer check.
void processInputDevices(void)
vector< D3D11RenderWindow * >::type SecondaryWindowList
Wrapper class which indicates a given angle value is in Radians.
Definition: OgreMath.h:46
D3D11RenderSystem(HINSTANCE hInstance)
void _setDepthBufferCheckEnabled(bool enabled=true)
Sets whether or not the depth buffer check is performed before a pixel write.
void initialiseFromRenderSystemCapabilities(RenderSystemCapabilities *caps, RenderTarget *primary)
See RenderSystem definition.
TextureType
Enum identifying the texture type.
Definition: OgreTexture.h:67
D3D11HardwareBufferManager * mHardwareBufferManager
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.
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:180
void setVertexBufferBinding(VertexBufferBinding *binding)
Sets the current vertex buffer binding state.
void setAmbientLight(float r, float g, float b)
Sets the colour & strength of the ambient (global directionless) light in the world.
static const ColourValue Black
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
D3D11Driver * mActiveD3DDriver
Currently active driver.
void _applyObliqueDepthProjection(Matrix4 &matrix, const Plane &plane, bool forGpuProgram)
Update a perspective projection matrix to use 'oblique depth projection'.
Implementation of DirectX9 as a rendering system.
2D texture, used in combination with 2D texture coordinates (default)
Definition: OgreTexture.h:72
void _setTextureCoordSet(size_t unit, size_t index)
Sets the texture coordinate set to use for a texture unit.
singleton class for storing the capabilities of the graphics card.
void _beginFrame(void)
Signifies the beginning of a frame, i.e.
void _setViewport(Viewport *vp)
Sets the provided viewport as the active one for future rendering operations.
void _setDepthBias(float constantBias, float slopeScaleBias)
Sets the depth bias, NB you should use the Material version of this.
_StringBase String
unsigned short uint16
Definition: OgrePlatform.h:247
StencilOperation
Enum describing the various actions which can be taken onthe stencil buffer.
FilterOptions
Filtering options for textures / mipmaps.
Definition: OgreCommon.h:101
void _setTextureMatrix(size_t unit, const Matrix4 &xform)
Sets the texture coordinate transformation matrix for a texture unit.
void convertPixelShaderCaps(RenderSystemCapabilities *rsc) const
Defines the functionality of a 3D API.
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:65
void _setTextureBorderColour(size_t stage, const ColourValue &colour)
Sets the texture border colour for a texture unit.
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.
Definition: OgreCommon.h:277
Real getMinimumDepthInputValue(void)
Gets the minimum (closest) depth value to be used when rendering using identity transforms.
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.
D3D11HLSLProgram * mBoundFragmentProgram
Class which manages blending of both colour and alpha components.
void bindGpuProgramParameters(GpuProgramType gptype, GpuProgramParametersSharedPtr params, uint16 mask)
See RenderSystem.
TextureType type
the type of the texture
Hlsl4FixedFuncEmuShaderGenerator mHlslFixedFuncEmuShaderGenerator
D3D11DriverList * getDirect3DDrivers(void)
structure holding texture unit settings for every stage
Specialization of HighLevelGpuProgram to provide support for D3D11 High-Level Shader Language (HLSL)...
RenderTexture * createRenderTexture(const String &name, unsigned int width, unsigned int height, TextureType texType=TEX_TYPE_2D, PixelFormat internalFormat=PF_X8R8G8B8, const NameValuePairList *miscParams=0)
D3D11HLSLProgram * mBoundGeometryProgram
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)...
unsigned int uint
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.
Factory class for D3D11 HLSL programs.
void setVertexDeclaration(VertexDeclaration *decl)
Sets the current vertex declaration, ie the source of vertex data.
void destroyRenderTarget(const String &name)
Destroys a render target of any sort.
CompareFunction mSceneAlphaRejectFunc
RenderWindow * _createRenderWindow(const String &name, unsigned int width, unsigned int height, bool fullScreen, const NameValuePairList *miscParams=0)
Creates a new rendering window.