OGRE
1.11.6
Object-Oriented Graphics Rendering Engine
|
Specialisation of VertexDeclaration for D3D9. More...
#include <OgreD3D9VertexDeclaration.h>
Public Types | |
typedef std::list< VertexElement > | VertexElementList |
Defines the list of vertex elements that makes up this declaration. More... | |
Public Member Functions | |
D3D9VertexDeclaration () | |
~D3D9VertexDeclaration () | |
const VertexElement & | addElement (unsigned short source, size_t offset, VertexElementType theType, VertexElementSemantic semantic, unsigned short index=0) |
Adds a new VertexElement to this declaration. More... | |
VertexDeclaration * | clone (HardwareBufferManagerBase *mgr=0) const OGRE_NODISCARD |
Clones this declaration. More... | |
void | closeGapsInSource (void) |
Remove any gaps in the source buffer list used by this declaration. More... | |
const VertexElement * | findElementBySemantic (VertexElementSemantic sem, unsigned short index=0) const |
Finds a VertexElement with the given semantic, and index if there is more than one element with the same semantic. More... | |
VertexElementList | findElementsBySource (unsigned short source) const |
Based on the current elements, gets the size of the vertex for a given buffer source. More... | |
VertexDeclaration * | getAutoOrganisedDeclaration (bool skeletalAnimation, bool vertexAnimation, bool vertexAnimationNormals) const |
Generates a new VertexDeclaration for optimal usage based on the current vertex declaration, which can be used with VertexData::reorganiseBuffers later if you wish, or simply used as a template. More... | |
IDirect3DVertexDeclaration9 * | getD3DVertexDeclaration (VertexDeclaration *globalDeclaration, bool useGlobalInstancingVertexBufferIsAvailable) |
Gets the D3D9-specific vertex declaration. More... | |
const VertexElement * | getElement (unsigned short index) const |
Get a single element. More... | |
size_t | getElementCount (void) const |
Get the number of elements in the declaration. More... | |
const VertexElementList & | getElements (void) const |
Gets read-only access to the list of vertex elements. More... | |
unsigned short | getMaxSource (void) const |
Gets the index of the highest source value referenced by this declaration. More... | |
unsigned short | getNextFreeTextureCoordinate () const |
Return the index of the next free texture coordinate set which may be added to this declaration. More... | |
size_t | getVertexSize (unsigned short source) const |
Gets the vertex size defined by this declaration for a given source. More... | |
const VertexElement & | insertElement (unsigned short atPosition, unsigned short source, size_t offset, VertexElementType theType, VertexElementSemantic semantic, unsigned short index=0) |
Inserts a new VertexElement at a given position in this declaration. More... | |
void | modifyElement (unsigned short elem_index, unsigned short source, size_t offset, VertexElementType theType, VertexElementSemantic semantic, unsigned short index=0) |
Modify an element in-place, params as addElement. More... | |
virtual void | notifyOnDeviceCreate (IDirect3DDevice9 *d3d9Device) |
virtual void | notifyOnDeviceDestroy (IDirect3DDevice9 *d3d9Device) |
virtual void | notifyOnDeviceLost (IDirect3DDevice9 *d3d9Device) |
virtual void | notifyOnDeviceReset (IDirect3DDevice9 *d3d9Device) |
bool | operator!= (const VertexDeclaration &rhs) const |
bool | operator== (const VertexDeclaration &rhs) const |
void | removeAllElements (void) |
Remove all elements. More... | |
void | removeElement (unsigned short elem_index) |
Remove the element at the given index from this declaration. More... | |
void | removeElement (VertexElementSemantic semantic, unsigned short index=0) |
Remove the element with the given semantic and usage index. More... | |
void | sort (void) |
Sorts the elements in this list to be compatible with the maximum number of rendering APIs / graphics cards. More... | |
Static Public Member Functions | |
static void | lockDeviceAccess () |
static void | unlockDeviceAccess () |
static bool | vertexElementLess (const VertexElement &e1, const VertexElement &e2) |
Sort routine for vertex elements. More... | |
Specialisation of VertexDeclaration for D3D9.
|
inherited |
Defines the list of vertex elements that makes up this declaration.
Ogre::D3D9VertexDeclaration::D3D9VertexDeclaration | ( | ) |
Ogre::D3D9VertexDeclaration::~D3D9VertexDeclaration | ( | ) |
|
virtual |
Reimplemented from Ogre::D3D9Resource.
|
virtual |
Reimplemented from Ogre::D3D9Resource.
IDirect3DVertexDeclaration9* Ogre::D3D9VertexDeclaration::getD3DVertexDeclaration | ( | VertexDeclaration * | globalDeclaration, |
bool | useGlobalInstancingVertexBufferIsAvailable | ||
) |
Gets the D3D9-specific vertex declaration.
|
staticinherited |
Sort routine for vertex elements.
|
inlineinherited |
Get the number of elements in the declaration.
References OGRE_NODISCARD.
|
inherited |
Gets read-only access to the list of vertex elements.
|
inherited |
Get a single element.
|
inherited |
Sorts the elements in this list to be compatible with the maximum number of rendering APIs / graphics cards.
|
inherited |
Remove any gaps in the source buffer list used by this declaration.
|
inherited |
Generates a new VertexDeclaration for optimal usage based on the current vertex declaration, which can be used with VertexData::reorganiseBuffers later if you wish, or simply used as a template.
skeletalAnimation | Whether this vertex data is going to be skeletally animated |
vertexAnimation | Whether this vertex data is going to be vertex animated |
vertexAnimationNormals | Whether vertex data animation is going to include normals animation |
|
inherited |
Gets the index of the highest source value referenced by this declaration.
|
inherited |
Adds a new VertexElement to this declaration.
source | The binding index of HardwareVertexBuffer which will provide the source for this element. See VertexBufferBinding for full information. |
offset | The offset in bytes where this element is located in the buffer |
theType | The data format of the element (3 floats, a colour etc) |
semantic | The meaning of the data (position, normal, diffuse colour etc) |
index | Optional index for multi-input elements like texture coordinates |
|
inherited |
Inserts a new VertexElement at a given position in this declaration.
source | The binding index of HardwareVertexBuffer which will provide the source for this element. See VertexBufferBinding for full information. |
offset | The offset in bytes where this element is located in the buffer |
theType | The data format of the element (3 floats, a colour etc) |
semantic | The meaning of the data (position, normal, diffuse colour etc) |
index | Optional index for multi-input elements like texture coordinates |
|
inherited |
Remove the element at the given index from this declaration.
|
inherited |
Remove the element with the given semantic and usage index.
|
inherited |
Remove all elements.
|
inherited |
Modify an element in-place, params as addElement.
|
inherited |
Finds a VertexElement with the given semantic, and index if there is more than one element with the same semantic.
|
inherited |
Based on the current elements, gets the size of the vertex for a given buffer source.
source | The buffer binding index for which to get the vertex size. Gets a list of elements which use a given source. |
|
inherited |
Gets the vertex size defined by this declaration for a given source.
|
inherited |
Return the index of the next free texture coordinate set which may be added to this declaration.
|
inherited |
Clones this declaration.
mgr | Optional HardwareBufferManager to use for creating the clone (if null, use the current default). |
|
inlineinherited |
|
inlineinherited |
|
inlinevirtualinherited |
Reimplemented in Ogre::D3D9Texture, Ogre::D3D9HardwareOcclusionQuery, Ogre::D3D9HardwareIndexBuffer, and Ogre::D3D9HardwareVertexBuffer.
|
inlinevirtualinherited |
Reimplemented in Ogre::D3D9Texture, Ogre::D3D9HardwareOcclusionQuery, Ogre::D3D9HardwareIndexBuffer, and Ogre::D3D9HardwareVertexBuffer.
References OGRE_STATIC_MUTEX.
|
staticinherited |
|
staticinherited |