![]() Ibb.order(ByteOrder.nativeOrder()) // use the device hardware's native byte order ![]() MTriangleVB.position(0) // set the buffer to read the first coordinateīyteBuffer ibb = ByteBuffer.allocateDirect( MTriangleVB.put(triangleCoords) // add the coordinates to the FloatBuffer MTriangleVB = vbb.asFloatBuffer() // create a floating point buffer from the ByteBuffer Vbb.order(ByteOrder.nativeOrder()) // use the device hardware's native byte order Private ShortBuffer mIndices // indices usedĪdded code to create the VBO: ByteBuffer vbb = ByteBuffer.allocateDirect( Private int mVBOid = new int // 2 ids needed for VBO and index buffer oject ![]() Now the next step: I want to use a Vertex Buffer Object to do the same thing. I added some code, to do the rendering alternatively with the glDrawElements command instead of glDrawArrays. ![]() On Android, I'm trying to get a simple OpenGL ES 2.0 application running, which uses a vertex buffer object, but I failed.Įverything is nicely explained and works as described. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |