启用顶点数组

时间:2014-05-07 21:13:39   收藏:0   阅读:295
bubuko.com,布布扣
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);
bubuko.com,布布扣

 

启用顶点数组,布布扣,bubuko.com

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!