启用顶点数组

static  GLint vertices[]={25,25,
                                 100,325,
175,25,
175,325,
250,25,
325,325};
static GLfloat colors[]={........};
glEnableClientState(GL_COLOR_ARRAY)
glEnableClientState(GL_VERTEX_ARRAY)

glColorPointer(3,GL_FLOAT,0,colors);
glVertexPointer(2,GL_INT,0,vertices);
原文地址:https://www.cnblogs.com/nkzhangkun/p/3714040.html