Merge pull request #10949 from dabingnn/v3_comments

[ci skip]adjust comments
This commit is contained in:
Huabing.Xu 2015-03-18 19:32:50 +08:00
commit 305e5b63ec
2 changed files with 43 additions and 5 deletions

View File

@ -121,9 +121,12 @@ protected:
static bool _enableShadowCopy;
public:
/**
Static getter/setter for shadowCopy.
Static getter for shadowCopy.
*/
static bool isShadowCopyEnabled() { return _enableShadowCopy; }
/**
Static setter for shadowCopy.
*/
static void enableShadowCopy(bool enabled) { _enableShadowCopy = enabled; }
};
@ -139,7 +142,9 @@ public:
*/
enum class IndexType
{
/**Short index will be used.*/
INDEX_TYPE_SHORT_16,
/**Int index will be used.*/
INDEX_TYPE_UINT_32
};
@ -234,9 +239,12 @@ protected:
static bool _enableShadowCopy;
public:
/**
Static getter/setter for shadowCopy.
Static getter for shadowCopy.
*/
static bool isShadowCopyEnabled() { return _enableShadowCopy; }
/**
Static setter for shadowCopy.
*/
static void enableShadowCopy(bool enabled) { _enableShadowCopy = enabled; }
};

View File

@ -45,25 +45,55 @@ glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized
*/
struct CC_DLL VertexStreamAttribute
{
/**
Constructor.
*/
VertexStreamAttribute()
: _normalize(false),_offset(0),_semantic(0),_type(0),_size(0)
{
}
/**
Constructor
@param offset The offset of the attribute.
@param semantic The semantic (Position, Texcoord, Color etc) of attribute.
@param type The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc.
@param size Describe how many elements of type in the attribute.
*/
VertexStreamAttribute(int offset, int semantic, int type, int size)
: _normalize(false),_offset(offset),_semantic(semantic),_type(type),_size(size)
{
}
/**
Constructor
@param offset The offset of the attribute.
@param semantic The semantic (Position, Texcoord, Color etc) of attribute.
@param type The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc.
@param size Describe how many elements of type in the attribute.
@param normalize If true, the data will be normalized by deviding 255.
*/
VertexStreamAttribute(int offset, int semantic, int type, int size, bool normalize)
: _normalize(normalize),_offset(offset),_semantic(semantic),_type(type),_size(size)
{
}
/**
Whether the attribute should be normalized or not.
*/
bool _normalize;
/**
The offset of the attribute in the buffer.
*/
int _offset;
/**
Describe that the attribute usage, could be Position, Color etc.
*/
int _semantic;
/**
Describe the type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc.
*/
int _type;
/**
Describe how many elements of type in the attribute.
*/
int _size;
};