[cocos2d-x] Spine 组件所有特性原生平台适配

This commit is contained in:
SmallMain
2022-07-05 11:05:41 +08:00
parent f4599764fe
commit 3b1584ee1c
25 changed files with 1801 additions and 312 deletions

View File

@@ -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),

View File

@@ -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
*/