开发者

glEnableClientState is not need for glVertexPointer in Android?

开发者 https://www.devze.com 2023-02-24 06:47 出处:网络
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 fro

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

精彩评论

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

关注公众号