OgreD3D9Mappings.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-2013 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 __D3D9MAPPINGS_H__
29 #define __D3D9MAPPINGS_H__
30 
31 #include "OgreD3D9Prerequisites.h"
32 #include "OgreCommon.h"
33 #include "OgreLight.h"
34 #include "OgreMaterial.h"
35 #include "OgreRenderSystem.h"
36 #include "OgreHardwareBuffer.h"
38 
39 namespace Ogre
40 {
42  {
43  public:
46  {
54  D3D_TEX_TYPE_NONE
55  };
56 
59  {
65  D3D_FUSAGE_MIP
66  };
67 
69  static DWORD get(ShadeOptions so);
71  static D3DLIGHTTYPE get(Ogre::Light::LightTypes lightType);
73  static DWORD get(TexCoordCalcMethod m, const D3DCAPS9& caps);
75  static D3DTEXTUREADDRESS get(TextureUnitState::TextureAddressingMode tam, const D3DCAPS9& devCaps);
77  static D3DTEXTURESTAGESTATETYPE get(LayerBlendType lbt);
79  static DWORD get(LayerBlendOperationEx lbo, const D3DCAPS9& devCaps);
81  static DWORD get(LayerBlendSource lbs, bool perStageConstants);
83  static D3DBLEND get(SceneBlendFactor sbf);
85  static D3DBLENDOP get(SceneBlendOperation sbo);
87  static DWORD get(CompareFunction cf);
89  static DWORD get(CullingMode cm, bool flip);
91  static D3DFOGMODE get(FogMode fm);
93  static D3DFILLMODE get(PolygonMode level);
95  static DWORD get(StencilOperation op, bool invert = false);
97  static D3DSAMPLERSTATETYPE get(FilterType ft);
99  static DWORD get(FilterType ft, FilterOptions fo, const D3DCAPS9& devCaps, eD3DTexType texType);
101  static eD3DTexType get(TextureType ogreTexType);
103  static DWORD get(HardwareBuffer::Usage usage);
105  static DWORD get(HardwareBuffer::LockOptions options, HardwareBuffer::Usage usage);
107  static D3DFORMAT get(HardwareIndexBuffer::IndexType itype);
109  static D3DDECLTYPE get(VertexElementType vType);
111  static D3DDECLUSAGE get(VertexElementSemantic sem);
112  // Convert matrix to D3D style
113  static D3DXMATRIX makeD3DXMatrix( const Matrix4& mat );
114  // Convert matrix from D3D style
115  static Matrix4 convertD3DXMatrix( const D3DXMATRIX& mat );
116 
118  static PixelFormat _getPF(D3DFORMAT d3dPF);
120  static D3DFORMAT _getPF(PixelFormat ogrePF);
122  static PixelFormat _getClosestSupportedPF(PixelFormat ogrePF);
123  };
124 }
125 #endif
Ogre::TextureUnitState::TextureAddressingMode
TextureAddressingMode
Texture addressing modes - default is TAM_WRAP.
Definition: OgreTextureUnitState.h:126
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::Light::LightTypes
LightTypes
Defines the type of light.
Definition: OgreLight.h:82
OgreD3D9Prerequisites.h
Ogre::LayerBlendSource
LayerBlendSource
List of valid sources of values for blending operations used in TextureUnitState::setColourOperation ...
Definition: OgreBlendMode.h:112
Ogre::FogMode
FogMode
Fog modes.
Definition: OgreCommon.h:121
OgreHardwareIndexBuffer.h
OgreMaterial.h
Ogre::LayerBlendType
LayerBlendType
Type of texture blend mode.
Definition: OgreBlendMode.h:44
Ogre::CompareFunction
CompareFunction
Comparison functions used for the depth/stencil buffer operations and others.
Definition: OgreCommon.h:64
Ogre::VertexElementSemantic
VertexElementSemantic
Vertex element semantics, used to identify the meaning of vertex buffer contents.
Definition: OgreHardwareVertexBuffer.h:99
Ogre::D3D9Mappings::eD3DFilterUsage
eD3DFilterUsage
enum identifying D3D9 filter usage type
Definition: OgreD3D9Mappings.h:58
Ogre::VertexElementType
VertexElementType
Vertex element type, used to identify the base types of the vertex contents.
Definition: OgreHardwareVertexBuffer.h:123
Ogre::StencilOperation
StencilOperation
Enum describing the various actions which can be taken on the stencil buffer.
Definition: OgreRenderSystem.h:81
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:78
Ogre::D3D9Mappings::D3D_FUSAGE_MAG
@ D3D_FUSAGE_MAG
mag filter
Definition: OgreD3D9Mappings.h:63
Ogre::SceneBlendFactor
SceneBlendFactor
Blending factors for manually blending objects with the scene.
Definition: OgreBlendMode.h:234
Ogre::PixelFormat
PixelFormat
The pixel format used for images, textures, and render surfaces.
Definition: OgrePixelFormat.h:43
OgreLight.h
Ogre::D3D9Mappings::D3D_TEX_TYPE_VOLUME
@ D3D_TEX_TYPE_VOLUME
volume texture
Definition: OgreD3D9Mappings.h:52
Ogre::FilterOptions
FilterOptions
Filtering options for textures / mipmaps.
Definition: OgreCommon.h:100
Ogre::HardwareIndexBuffer::IndexType
IndexType
Definition: OgreHardwareIndexBuffer.h:49
Ogre::D3D9Mappings::D3D_FUSAGE_MIN
@ D3D_FUSAGE_MIN
min filter
Definition: OgreD3D9Mappings.h:61
Ogre::D3D9Mappings
Definition: OgreD3D9Mappings.h:41
OgreCommon.h
Ogre::CullingMode
CullingMode
Hardware culling modes based on vertex winding.
Definition: OgreCommon.h:135
Ogre::D3D9Mappings::eD3DTexType
eD3DTexType
enum identifying D3D9 tex. types
Definition: OgreD3D9Mappings.h:45
_OgreD3D9Export
#define _OgreD3D9Export
Definition: OgreD3D9Prerequisites.h:118
Ogre::ShadeOptions
ShadeOptions
Light shading modes.
Definition: OgreCommon.h:113
Ogre::HardwareBuffer::Usage
Usage
Enums describing buffer usage; not mutually exclusive.
Definition: OgreHardwareBuffer.h:79
Ogre::LayerBlendOperationEx
LayerBlendOperationEx
Expert list of valid texture blending operations, for use with TextureUnitState::setColourOperationEx...
Definition: OgreBlendMode.h:75
Ogre::TextureType
TextureType
Enum identifying the texture type.
Definition: OgreTexture.h:67
Ogre::HardwareBuffer::LockOptions
LockOptions
Locking options.
Definition: OgreHardwareBuffer.h:121
OgreHardwareBuffer.h
Ogre::TexCoordCalcMethod
TexCoordCalcMethod
Enum describing the ways to generate texture coordinates.
Definition: OgreRenderSystem.h:67
Ogre::D3D9Mappings::D3D_TEX_TYPE_CUBE
@ D3D_TEX_TYPE_CUBE
cube texture
Definition: OgreD3D9Mappings.h:50
Ogre::FilterType
FilterType
Definition: OgreCommon.h:90
Ogre::PolygonMode
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:179
Ogre::D3D9Mappings::D3D_TEX_TYPE_NORMAL
@ D3D_TEX_TYPE_NORMAL
standard texture
Definition: OgreD3D9Mappings.h:48
Ogre::SceneBlendOperation
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
Definition: OgreBlendMode.h:253
OgreRenderSystem.h

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15