Cocos2d-x结构学习(九)ccV3F_C4B_T2F_Quad、ccV3F_C4B_T2F、ccVertex3F、ccColor4B、ccTex2F

来源:互联网 发布:懒人桌 知乎 编辑:程序博客网 时间:2024/05/16 21:43
1、ccV3F_C4B_T2F_Quad:保存四个元素的结构
typedef struct _ccV3F_C4B_T2F_Quad{    ccV3F_C4B_T2F    tl;     //top-left    ccV3F_C4B_T2F    bl;     //bottom-left    ccV3F_C4B_T2F    tr;     //top-right    ccV3F_C4B_T2F    br;    //bottom-right} ccV3F_C4B_T2F_Quad;
2、ccV3F_C4B_T2F
typedef struct _ccV3F_C4B_T2F{    ccVertex3F        vertices;     //顶点    ccColor4B        colors;            //颜色    ccTex2F            texCoords;      //纹理} ccV3F_C4B_T2F;
3、ccVertex3F
typedef struct _ccVertex3F{    GLfloat x;    GLfloat y;    GLfloat z;} ccVertex3F;
4、ccColor4B
typedef struct _ccColor4B{    GLubyte r;    GLubyte g;    GLubyte b;    GLubyte a;} ccColor4B;
5、ccTex2F
typedef struct _ccTex2F {     GLfloat u;     GLfloat v;} ccTex2F;
0 0
原创粉丝点击