Cocos2d-x  v3.12
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
VertexData Class Reference

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...

Inherits Ref.

Public Member Functions

size_t getVertexStreamCount () const
 Get the number of streams in the VertexData.
 
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 VertexStreamAttributegetStreamAttribute (int semantic) const
 Get the attribute of stream, const version. More...
 
local getStreamAttribute ( local semantic)
 Get the attribute of stream, const version. More...
 
VertexStreamAttributegetStreamAttribute (int semantic)
 Get the attribute of stream. More...
 
local getStreamAttribute ( local semantic)
 Get the attribute of stream. More...
 
VertexBuffergetStreamBuffer (int semantic) const
 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.
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
local retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor.
 

Static Public Member Functions

static VertexDatacreate ()
 Create function, used to create a instance of VertexData.
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
local _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
local _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
local _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 
local _rooted
 When true, it means that the object was already rooted.
 
bool _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 
local _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 

Detailed Description

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.

Member Function Documentation

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.

The binding buffer of the 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.

The binding buffer of the stream. The binding vertex attribute, its member semantic will be used as the identifier.

void removeStream ( int  semantic)

Remove the given streams.

The semantic of the stream.

local removeStream ( local  semantic)

Remove the given streams.

The semantic of the stream.

const VertexStreamAttribute*
getStreamAttribute
( int  semantic) const

Get the attribute of stream, const version.

The semantic of the stream.

local getStreamAttribute ( local  semantic)

Get the attribute of stream, const version.

The semantic of the stream.

VertexStreamAttribute*
getStreamAttribute
( int  semantic)

Get the attribute of stream.

The semantic of the stream.

local getStreamAttribute ( local  semantic)

Get the attribute of stream.

The semantic of the stream.

VertexBuffer* getStreamBuffer ( int  semantic) const

Get the binded buffer of the stream.

The semantic of the stream.

local getStreamBuffer ( local  semantic)

Get the binded buffer of the stream.

The semantic of the stream.


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