mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-11-10 16:55:24 +00:00
[cocos2d-x] Spine 组件所有特性原生平台适配
This commit is contained in:
@@ -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
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user