cocos2d-x  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
VertexAttribValue Class Reference

Vertex Attribute Value, which is an abstraction of VertexAttribute and data pointer. More...

#include <CCGLProgramState.h>

Classes

union  U
 

Public Member Functions

void setPointer (GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid *pointer)
 Set the data pointer, which is similar as glVertexAttribPointer. More...
 
var setPointer ( var size, var type, var normalized, var stride, var pointer)
 Set the data pointer, which is similar as glVertexAttribPointer. More...
 
local setPointer ( local size, local type, local normalized, local stride, local pointer)
 Set the data pointer, which is similar as glVertexAttribPointer. More...
 
void setCallback (const std::function< void(VertexAttrib *)> &callback)
 Set a user call back for set VertexAttrib array. More...
 
void apply ()
 Apply the vertex attribute to the openGL pipeline. More...
 
 VertexAttribValue (VertexAttrib *vertexAttrib)
 Constuctor and Destructor. More...
 
 VertexAttribValue ( var vertexAttrib)
 Constuctor and Destructor. More...
 
 VertexAttribValue ( local vertexAttrib)
 Constuctor and Destructor. More...
 
 VertexAttribValue ()
 ~VertexAttribValue ()

Protected Attributes

VertexAttrib_vertexAttrib
bool _useCallback
bool _enabled
union cocos2d::VertexAttribValue::U _value

Friends

class GLProgram
class GLProgramState

Detailed Description

Vertex Attribute Value, which is an abstraction of VertexAttribute and data pointer.

Constructor & Destructor Documentation

VertexAttribValue ( VertexAttrib vertexAttrib)

Constuctor and Destructor.

vertexAttrib VertexAttrib from shader.

var VertexAttribValue ( var  vertexAttrib)

Constuctor and Destructor.

vertexAttrib VertexAttrib from shader.

local VertexAttribValue ( local  vertexAttrib)

Constuctor and Destructor.

vertexAttrib VertexAttrib from shader.

local VertexAttribValue ( )
local ~VertexAttribValue ( )

Member Function Documentation

void apply ( )

Apply the vertex attribute to the openGL pipeline.

var apply ( )

Apply the vertex attribute to the openGL pipeline.

local apply ( )

Apply the vertex attribute to the openGL pipeline.

void setCallback ( const std::function< void(VertexAttrib *)> &  callback)

Set a user call back for set VertexAttrib array.

var setCallback ( var  callback)

Set a user call back for set VertexAttrib array.

local setCallback ( local  callback)

Set a user call back for set VertexAttrib array.

void setPointer ( GLint  size,
GLenum  type,
GLboolean  normalized,
GLsizei  stride,
GLvoid *  pointer 
)

Set the data pointer, which is similar as glVertexAttribPointer.

Parameters
sizeThe number of type in the vertex attribute.
typeThe type of data in vertex attribute.
normalizedIf true, 0-255 data will be mapped to 0.0-1.0.
strideThe number of bytes if an interleaved vertex array is used. 0 means array is not interleaved.
pointerThe pointer to the vertex data.
var setPointer ( var  size,
var  type,
var  normalized,
var  stride,
var  pointer 
)

Set the data pointer, which is similar as glVertexAttribPointer.

Parameters
sizeThe number of type in the vertex attribute.
typeThe type of data in vertex attribute.
normalizedIf true, 0-255 data will be mapped to 0.0-1.0.
strideThe number of bytes if an interleaved vertex array is used. 0 means array is not interleaved.
pointerThe pointer to the vertex data.
local setPointer ( local  size,
local  type,
local  normalized,
local  stride,
local  pointer 
)

Set the data pointer, which is similar as glVertexAttribPointer.

Parameters
sizeThe number of type in the vertex attribute.
typeThe type of data in vertex attribute.
normalizedIf true, 0-255 data will be mapped to 0.0-1.0.
strideThe number of bytes if an interleaved vertex array is used. 0 means array is not interleaved.
pointerThe pointer to the vertex data.

Friends And Related Function Documentation

friend class GLProgram
friend
var GLProgram
friend
local GLProgram
friend
friend class GLProgramState
friend
var GLProgramState
friend
local GLProgramState
friend

Member Data Documentation

bool _enabled
protected
var _enabled
protected
local _enabled
protected
bool _useCallback
protected
var _useCallback
protected
local _useCallback
protected
union
cocos2d::VertexAttribValue::U
_value
protected
var _value
protected
local _value
protected
VertexAttrib* _vertexAttrib
protected

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