![]() ![]() Disable the client state before leaving Gl.glDrawElements(GL10.GL_TRIANGLES, indices.length, GL10.GL_UNSIGNED_BYTE, indexBuffer) ![]() Draw the vertices as triangles, based on the Index Buffer information Gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer) ![]() Gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer) Gl.glScalef(tranform.scale, tranform.scale, tranform.scale) //*/ Gl.glRotatef(tranform.rotationAngle, 0.0f, 0.0f, 1.0f) Gl.glRotatef(tranform.rotationAngle, 0.0f, 1.0f, 0.0f) Gl.glRotatef(tranform.rotationAngle, 1.0f, 0.0f, 0.0f) Gl.glTranslatef(tranform.pos, tranform.pos, tranform.pos) Gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY) Gl.glEnableClientState(GL10.GL_VERTEX_ARRAY) Enable the vertex, texture and normal state Gl.glBindTexture(GL10.GL_TEXTURE_2D, textures) Bind the texture according to the set texture filter IndexBuffer = ByteBuffer.allocateDirect(indices.length) ByteBuffer byteBuf = ByteBuffer.allocateDirect(vertices.length * 4) īyteBuf = ByteBuffer.allocateDirect(texture.length * 4) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |