开发者

glEnableClientState is not need for glVertexPointer in Android?

I am developing in android 2.1 framework.

According to Opengles's doc, we should call glEnableClientState(GL_VERTEX_ARRAY) to make glVertexPointer used by glDrawElements. But I didn't see that from my tutorial, could anybody tells my why, any clue?

My tutorial is: I try to create a 3d application that display a simple cube, I found that 开发者_开发问答whether I use

  1. glEnableClientState(GL_VERTEX_ARRAY)

  2. glDisableClientState(GL_VERTEX_ARRAY) //glEnableClientState(GL_VERTEX_ARRAY)

It makes nothing different of result, a cube was displayed normally.


IMHO, if you'll use the several cubes, one with color array and another without color array, you'll need to disable (GL_COLOR_ARRAY) color array before drawing a cube without color array

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜