Torque3D Documentation / _generateds / GFXVertexFormat

GFXVertexFormat

Engine/source/gfx/gfxVertexFormat.h

The vertex format structure usually created via the declare and implement macros.

More...

Protected Attributes

The hardware specific vertex declaration.

An interned string which uniquely identifies the format.

bool

Set when the element list is changed.

The elements of the vertex format.

bool

Is true if there is a BLENDWEIGHT or BLENDINDICES semantic in this vertex format.

bool

Is true if there is a COLOR semantic in this vertex format.

bool

Is instaning used with this vertex format.

bool

Is set if there is a NORMAL semantic in this vertex format.

bool

Is true if there is a TANGENT semantic in this vertex format.

The size in bytes of the vertex format as described.

The texture coordinate count by counting the number of "TEXCOORD" semantics.

Public Functions

Default constructor for an empty format.

The copy constructor.

addElement(const String & semantic, GFXDeclType type, U32 index, U32 stream)

Adds a vertex element to the format.

append(const GFXVertexFormat & format, U32 streamIndex)

Used to append a vertex format to the end of this one.

Clears all the vertex elements.

Copy the other vertex format.

Tell this format it has instancing.

Returns the hardware specific vertex declaration for this format.

Returns a unique description string for this vertex format.

getElement(U32 index)

Returns the vertex element by index.

Returns the total elements in this format.

Returns number of blend indices.

Returns the size in bytes of the format as described.

Returns the texture coordinate count by counting the number of TEXCOORD semantics.

bool

Returns true if there is a BLENDWEIGHT or BLENDINDICES semantic in this vertex format.

bool

Returns true if there is a COLOR semantic in this vertex format.

bool

Return true if instancing is used with this vertex format.

bool

Returns true if there is a NORMAL semantic in this vertex format.

bool

Returns true if there is a TANGENT semantic in this vertex format.

bool

Returns true if these two formats are equal.

Protected Functions

Requests the vertex declaration from the GFX device.

Recreates the description and state when the format has been modified.

We disable the copy operator.

Detailed Description

The vertex format structure usually created via the declare and implement macros.

You can use this class directly to create a vertex format, but note that it is expected to live as long as the VB that uses it exists.

Protected Attributes

GFXVertexDecl * mDecl 

The hardware specific vertex declaration.

String mDescription 

An interned string which uniquely identifies the format.

bool mDirty 

Set when the element list is changed.

Vector< GFXVertexElement > mElements 

The elements of the vertex format.

bool mHasBlendIndices 

Is true if there is a BLENDWEIGHT or BLENDINDICES semantic in this vertex format.

bool mHasColor 

Is true if there is a COLOR semantic in this vertex format.

bool mHasInstancing 

Is instaning used with this vertex format.

bool mHasNormal 

Is set if there is a NORMAL semantic in this vertex format.

bool mHasTangent 

Is true if there is a TANGENT semantic in this vertex format.

U32 mSizeInBytes 

The size in bytes of the vertex format as described.

U32 mTexCoordCount 

The texture coordinate count by counting the number of "TEXCOORD" semantics.

Public Functions

GFXVertexFormat()

Default constructor for an empty format.

GFXVertexFormat(const GFXVertexFormat & format)

The copy constructor.

addElement(const String & semantic, GFXDeclType type, U32 index, U32 stream)

Adds a vertex element to the format.

Parameters:

semantic

A valid Torque semantic string.

type

The element type.

index

The semantic index which is typically only used for texcoords.

append(const GFXVertexFormat & format, U32 streamIndex)

Used to append a vertex format to the end of this one.

clear()

Clears all the vertex elements.

copy(const GFXVertexFormat & format)

Copy the other vertex format.

enableInstancing()

Tell this format it has instancing.

getDecl()

Returns the hardware specific vertex declaration for this format.

getDescription()

Returns a unique description string for this vertex format.

getElement(U32 index)

Returns the vertex element by index.

getElementCount()

Returns the total elements in this format.

getNumBlendIndices()

Returns number of blend indices.

getSizeInBytes()

Returns the size in bytes of the format as described.

getTexCoordCount()

Returns the texture coordinate count by counting the number of TEXCOORD semantics.

hasBlendIndices()

Returns true if there is a BLENDWEIGHT or BLENDINDICES semantic in this vertex format.

hasColor()

Returns true if there is a COLOR semantic in this vertex format.

hasInstancing()

Return true if instancing is used with this vertex format.

hasNormal()

Returns true if there is a NORMAL semantic in this vertex format.

hasTangent()

Returns true if there is a TANGENT semantic in this vertex format.

isEqual(const GFXVertexFormat & format)

Returns true if these two formats are equal.

Protected Functions

_updateDecl()

Requests the vertex declaration from the GFX device.

_updateDirty()

Recreates the description and state when the format has been modified.

operator=(const GFXVertexFormat & )

We disable the copy operator.