There seems to be a bug where calling FloatBuffer.put() on a buffer create as such :
ByteBuffer bufferVerts = ByteBuffer.allocateDirect(numVerts * 3 * 4); bufferVerts.order(ByteOrder.nativeOrder()); m_bufferVerts = bufferVerts.asFloatBuffer(); m_bufferVerts.position(0); does not properly write. Basically, calling : m_bufferVerts.put(-0.5f); m_bufferVerts.put(0.5f); m_bufferVerts.put(0.0f); does not give a vert at that location. The vert location is random (Changes each time I run the app), indicating that put did not write anything, leaving memory to whatever garbage it initially had. However, calling m_bufferVerts.put(0, -0.5f); m_bufferVerts.put(1, 0.5f); m_bufferVerts.put(2, 0.0f); works. I can keep my own position counter, but since FloatBuffer claims to have one internally, shouldn't those two pieces of code have the same result? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---