APEX Framework: nvidia::apex::VertexFormat Class Reference

NVIDIA APEX

nvidia::apex::VertexFormat Class Reference

Describes the format of an VertexBuffer. More...

#include <VertexFormat.h>

List of all members.

Public Types

enum  {
  MAX_UV_COUNT = 4,
  MAX_BONE_PER_VERTEX_COUNT = 4
}
typedef uint32_t BufferID
 Buffer ID.

Public Member Functions

virtual void reset ()=0
 Resets the format to the initial state.
virtual void setWinding (RenderCullMode::Enum winding)=0
 Sets the winding (cull mode) for this format.
virtual void setHasSeparateBoneBuffer (bool hasSeparateBoneBuffer)=0
 Sets whether or not a separate bone buffer is used.
virtual RenderCullMode::Enum getWinding () const =0
 Accessor to read winding (cull mode)
virtual bool hasSeparateBoneBuffer () const =0
 Accessor to read if a seperate vertex buffer for bone indices and weights is generated.
virtual const char * getSemanticName (RenderVertexSemantic::Enum semantic) const =0
 Returns a buffer name for a semantic. Returns NULL if the semantic is invalid.
virtual BufferID getSemanticID (RenderVertexSemantic::Enum semantic) const =0
 Returns a buffer ID for a semantic. For custom buffers, use the getID() function.
virtual BufferID getID (const char *name) const =0
 Returns a buffer ID for a named buffer. For standard semantics, the getSemanticID( semantic ) function is faster, but is equivalent to getID( getSemanticName( semantic ) ). Returns 0 if name == NULL.
virtual int32_t addBuffer (const char *name)=0
 Adds a vertex buffer channel to this format.
virtual bool bufferReplaceWithLast (uint32_t index)=0
 Removes a buffer.
virtual bool setBufferFormat (uint32_t index, RenderDataFormat::Enum format)=0
 Set the format for a semantic.
virtual bool setBufferAccess (uint32_t index, RenderDataAccess::Enum access)=0
 Set the access type for a buffer (static, dynamic, etc.)
virtual bool setBufferSerialize (uint32_t index, bool serialize)=0
 Set whether or not the buffer should be serialized.
virtual const char * getBufferName (uint32_t index) const =0
 Accessor to read the name of a given buffer.
virtual RenderVertexSemantic::Enum getBufferSemantic (uint32_t index) const =0
 Accessor to read the semantic of a given buffer.
virtual BufferID getBufferID (uint32_t index) const =0
 Accessor to read the ID of a given buffer.
virtual RenderDataFormat::Enum getBufferFormat (uint32_t index) const =0
 Get the format for a buffer.
virtual RenderDataAccess::Enum getBufferAccess (uint32_t index) const =0
 Get the access type for a buffer (static, dynamic, etc.)
virtual bool getBufferSerialize (uint32_t index) const =0
 Get whether or not the buffer should be serialized.
virtual uint32_t getBufferCount () const =0
 Accessor to read the number of buffers.
virtual uint32_t getCustomBufferCount () const =0
 Returns the number of buffers that are user-specified.
virtual int32_t getBufferIndexFromID (BufferID id) const =0
 Accessor to get the buffer index If the buffer is not found, -1 is returned.

Detailed Description

Describes the format of an VertexBuffer.


Member Function Documentation

virtual int32_t nvidia::apex::VertexFormat::addBuffer ( const char *  name) [pure virtual]

Adds a vertex buffer channel to this format.

Parameters:
[in]namethe name of a new buffer (use getSemanticName for standard semantics)
Returns:
The buffer index. If the buffer for the semantic already exists, the index of the existing buffer is returned. Returns -1 if there is an error (e.g. name == NULL).
virtual bool nvidia::apex::VertexFormat::bufferReplaceWithLast ( uint32_t  index) [pure virtual]

Removes a buffer.

Parameters:
[in]indexthe buffer to remove
Returns:
True if successful, false otherwise (if the buffer index was invalid)
virtual RenderDataAccess::Enum nvidia::apex::VertexFormat::getBufferAccess ( uint32_t  index) const [pure virtual]

Get the access type for a buffer (static, dynamic, etc.)

Returns:
The buffer access if successful, RenderDataAccess::ACCESS_TYPE_COUNT otherwise.
virtual RenderDataFormat::Enum nvidia::apex::VertexFormat::getBufferFormat ( uint32_t  index) const [pure virtual]

Get the format for a buffer.

Returns:
The buffer format if successful, RenderDataFormat::UNSPECIFIED otherwise.
virtual BufferID nvidia::apex::VertexFormat::getBufferID ( uint32_t  index) const [pure virtual]

Accessor to read the ID of a given buffer.

Returns:
The buffer semantic if successful, 0 otherwise.
virtual const char* nvidia::apex::VertexFormat::getBufferName ( uint32_t  index) const [pure virtual]

Accessor to read the name of a given buffer.

Returns:
The buffer name if successful, NULL otherwise.
virtual RenderVertexSemantic::Enum nvidia::apex::VertexFormat::getBufferSemantic ( uint32_t  index) const [pure virtual]

Accessor to read the semantic of a given buffer.

Returns:
The buffer semantic if successful, RenderVertexSemantic::NUM_SEMANTICS otherwise.
virtual bool nvidia::apex::VertexFormat::getBufferSerialize ( uint32_t  index) const [pure virtual]

Get whether or not the buffer should be serialized.

Returns:
Whether or not the buffer should be serialized if successful, false otherwise.
virtual bool nvidia::apex::VertexFormat::setBufferAccess ( uint32_t  index,
RenderDataAccess::Enum  access 
) [pure virtual]

Set the access type for a buffer (static, dynamic, etc.)

Returns:
True if successful, false otherwise (if the buffer index was invalid)
virtual bool nvidia::apex::VertexFormat::setBufferFormat ( uint32_t  index,
RenderDataFormat::Enum  format 
) [pure virtual]

Set the format for a semantic.

Returns:
True if successful, false otherwise (if the buffer index was invalid)
virtual bool nvidia::apex::VertexFormat::setBufferSerialize ( uint32_t  index,
bool  serialize 
) [pure virtual]

Set whether or not the buffer should be serialized.

Returns:
True if successful, false otherwise (if the buffer index was invalid)

The documentation for this class was generated from the following file:

Generated on Fri Dec 15 2017 13:58:41

Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.