首页 > 代码库 > 启用顶点数组

启用顶点数组

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);