VertexData is a class used for specify input streams for GPU rendering pipeline, a VertexData will be composed by several streams, every stream will contain a VertexStreamAttribute and the binding VertexBuffer. More...
#include <CCVertexIndexData.h>
Classes | |
struct | BufferAttribute |
Simple struct to bundle buffer and attribute. More... | |
Public Member Functions | |
size_t | getVertexStreamCount () const |
Get the number of streams in the VertexData. More... | |
bool | setStream (VertexBuffer *buffer, const VertexStreamAttribute &stream) |
Set a stream to VertexData,given that stream is identified by semantic, so if the semantic is not specified before, it will add a stream, or it will override the old one. More... | |
void | removeStream (int semantic) |
Remove the given streams. More... | |
const VertexStreamAttribute * | getStreamAttribute (int semantic) const |
Get the attribute of stream, const version. More... | |
local | getStreamAttribute ( local semantic) |
Get the attribute of stream, const version. More... | |
VertexStreamAttribute * | getStreamAttribute (int semantic) |
Get the attribute of stream. More... | |
local | getStreamAttribute ( local semantic) |
Get the attribute of stream. More... | |
VertexBuffer * | getStreamBuffer (int semantic) const |
Get the binded buffer of the stream. More... | |
local | getStreamBuffer ( local semantic) |
Get the binded buffer of the stream. More... | |
void | use () |
Called for rendering, it will bind the state of vertex data to current rendering pipeline. More... | |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. More... | |
Static Public Member Functions | |
static VertexData * | create () |
Create function, used to create a instance of VertexData. More... | |
Protected Member Functions | |
VertexData () | |
Constructor. More... | |
VertexData () | |
Constructor. More... | |
virtual | ~VertexData () |
Destructor. More... | |
Protected Member Functions inherited from Ref | |
Ref () | |
Constructor. More... | |
Ref () | |
Constructor. More... | |
Protected Attributes | |
std::map< int, BufferAttribute > | _vertexStreams |
Streams in the VertexData. More... | |
Protected Attributes inherited from Ref | |
unsigned int | _referenceCount |
count of references More... | |
local | _referenceCount |
count of references More... | |
VertexData is a class used for specify input streams for GPU rendering pipeline, a VertexData will be composed by several streams, every stream will contain a VertexStreamAttribute and the binding VertexBuffer.
Streams will be identified by semantic.
|
protected |
Constructor.
|
protected |
Constructor.
|
protectedvirtual |
Destructor.
|
protectedvirtual |
Destructor.
|
static |
Create function, used to create a instance of VertexData.
|
static |
Create function, used to create a instance of VertexData.
const VertexStreamAttribute* getStreamAttribute |
( | int | semantic | ) | const |
Get the attribute of stream, const version.
semantic | The semantic of the stream. |
local getStreamAttribute | ( | local | semantic | ) |
Get the attribute of stream, const version.
semantic | The semantic of the stream. |
VertexStreamAttribute* getStreamAttribute |
( | int | semantic | ) |
Get the attribute of stream.
semantic | The semantic of the stream. |
local getStreamAttribute | ( | local | semantic | ) |
Get the attribute of stream.
semantic | The semantic of the stream. |
VertexBuffer* getStreamBuffer | ( | int | semantic | ) | const |
Get the binded buffer of the stream.
semantic | The semantic of the stream. |
local getStreamBuffer | ( | local | semantic | ) |
Get the binded buffer of the stream.
semantic | The semantic of the stream. |
size_t getVertexStreamCount | ( | ) | const |
Get the number of streams in the VertexData.
local getVertexStreamCount | ( | ) |
Get the number of streams in the VertexData.
void removeStream | ( | int | semantic | ) |
Remove the given streams.
semantic | The semantic of the stream. |
local removeStream | ( | local | semantic | ) |
Remove the given streams.
semantic | The semantic of the stream. |
bool setStream | ( | VertexBuffer * | buffer, |
const VertexStreamAttribute & | stream | ||
) |
Set a stream to VertexData,given that stream is identified by semantic, so if the semantic is not specified before, it will add a stream, or it will override the old one.
buffer | The binding buffer of the stream. |
stream | The binding vertex attribute, its member semantic will be used as the identifier. |
local setStream | ( | local | buffer, |
local | stream | ||
) |
Set a stream to VertexData,given that stream is identified by semantic, so if the semantic is not specified before, it will add a stream, or it will override the old one.
buffer | The binding buffer of the stream. |
stream | The binding vertex attribute, its member semantic will be used as the identifier. |
void use | ( | ) |
Called for rendering, it will bind the state of vertex data to current rendering pipeline.
local use | ( | ) |
Called for rendering, it will bind the state of vertex data to current rendering pipeline.
|
protected |
Streams in the VertexData.
|
protected |
Streams in the VertexData.