启用顶点数组

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

 

posted @ 2014-05-07 16:14  风刮过冷  阅读(129)  评论(0编辑  收藏  举报