Tag: 顶点数组

在iOS 5.1的股票OpenGL ES应用程序,他们真的在使用他们声明的顶点数组吗?

在股票OpenGL ES应用程序中(当您在XCode中创build一个新的“OpenGL游戏”时),在setupGL函数中,有: glEnable(GL_DEPTH_TEST); //glGenVertexArraysOES( 1, &_vertexArray ) ; // va's are not being used! //glBindVertexArrayOES( _vertexArray ) ; // we comment these out // to no ill effect — are these calls extraneous? glGenBuffers( 1, &_vertexBuffer ) ; glBindBuffer( GL_ARRAY_BUFFER, _vertexBuffer ) ; glBufferData( GL_ARRAY_BUFFER, sizeof(gCubeVertexData), gCubeVertexData, GL_STATIC_DRAW ) ; glEnableVertexAttribArray(GLKVertexAttribPosition); glVertexAttribPointer(GLKVertexAttribPosition, 3, GL_FLOAT, GL_FALSE, […]