mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-10-09 15:05:24 +00:00
[cocos2d-x] Spine 组件所有特性原生平台适配
This commit is contained in:
@@ -48,6 +48,21 @@ static uint32_t attrTypeBytes(AttribType attrType)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VertexFormat* VertexFormat::XY_UV_Two_Color_TexId = new VertexFormat(std::vector<Info>({
|
||||
Info(ATTRIB_NAME_POSITION, AttribType::FLOAT32, 2),
|
||||
Info(ATTRIB_NAME_UV0, AttribType::FLOAT32, 2),
|
||||
Info(ATTRIB_NAME_COLOR, AttribType::UINT8, 4, true),
|
||||
Info(ATTRIB_NAME_COLOR0, AttribType::UINT8, 4, true),
|
||||
Info(ATTRIB_NAME_TEXID, AttribType::FLOAT32, 1)
|
||||
}));
|
||||
|
||||
VertexFormat* VertexFormat::XY_UV_Color_TexId = new VertexFormat(std::vector<Info>({
|
||||
Info(ATTRIB_NAME_POSITION, AttribType::FLOAT32, 2),
|
||||
Info(ATTRIB_NAME_UV0, AttribType::FLOAT32, 2),
|
||||
Info(ATTRIB_NAME_COLOR, AttribType::UINT8, 4, true),
|
||||
Info(ATTRIB_NAME_TEXID, AttribType::FLOAT32, 1)
|
||||
}));
|
||||
|
||||
VertexFormat* VertexFormat::XY_UV_Two_Color = new VertexFormat(std::vector<Info>({
|
||||
Info(ATTRIB_NAME_POSITION, AttribType::FLOAT32, 2),
|
||||
Info(ATTRIB_NAME_UV0, AttribType::FLOAT32, 2),
|
||||
|
@@ -166,7 +166,15 @@ public:
|
||||
* Gets total byte size of a vertex
|
||||
*/
|
||||
uint32_t getBytes() const { return _bytes; };
|
||||
|
||||
|
||||
/*
|
||||
* Builtin VertexFormat with 2d position, uv, color, color0, texId attributes
|
||||
*/
|
||||
static VertexFormat* XY_UV_Two_Color_TexId;
|
||||
/*
|
||||
* Builtin VertexFormat with 2d position, uv, color, texId attributes
|
||||
*/
|
||||
static VertexFormat* XY_UV_Color_TexId;
|
||||
/*
|
||||
* Builtin VertexFormat with 2d position, uv, color, color0 attributes
|
||||
*/
|
||||
|
Reference in New Issue
Block a user