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

前端之家收集整理的这篇文章主要介绍了Cocos2d-x结构学习(九)ccV3F_C4B_T2F_Quad、ccV3F_C4B_T2F、ccVertex3F、ccColor4B、ccTex2F前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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;
原文链接:https://www.f2er.com/cocos2dx/343805.html

猜你在找的Cocos2d-x相关文章