[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

@@ -72,6 +72,45 @@ struct V2F_T2F_C4B_C4B
cocos2d::Color4B color2; // 4 bytes
};
/**
* Vertex Format with x y u v color texId.
*/
struct V2F_T2F_C4B_T1F
{
// vertices (2F)
cocos2d::Vec2 vertex; // 8 bytes
// tex coords (2F)
Tex2F texCoord; // 8 bytes
// colors (4B)
cocos2d::Color4B color; // 4 bytes
// tex id (1F)
GLfloat texId; // 4 bytes
};
/**
* Vertex Format with x y u v color1 color2 texId.
*/
struct V2F_T2F_C4B_C4B_T1F
{
// vertices (2F)
cocos2d::Vec2 vertex; // 8 bytes
// tex coords (2F)
Tex2F texCoord; // 8 bytes
// colors (4B)
cocos2d::Color4B color; // 4 bytes
// colors (4B)
cocos2d::Color4B color2; // 4 bytes
// tex id (1F)
GLfloat texId; // 4 bytes
};
struct Triangles
{
/**Vertex data pointer.*/
@@ -96,6 +135,30 @@ struct TwoColorTriangles
int indexCount = 0;
};
struct TrianglesTexId
{
/**Vertex data pointer.*/
V2F_T2F_C4B_T1F* verts = nullptr;
/**Index data pointer.*/
unsigned short* indices = nullptr;
/**The number of vertices.*/
int vertCount = 0;
/**The number of indices.*/
int indexCount = 0;
};
struct TwoColorTrianglesTexId
{
/**Vertex data pointer.*/
V2F_T2F_C4B_C4B_T1F* verts = nullptr;
/**Index data pointer.*/
unsigned short* indices = nullptr;
/**The number of vertices.*/
int vertCount = 0;
/**The number of indices.*/
int indexCount = 0;
};
///////////////////////////////////////////////////////////////////////
// adapt to editor texture,this is a texture delegate,not real texture
///////////////////////////////////////////////////////////////////////