Glmapbufferrange() Returns All Zeros In Android Opengles 3.0 Using Trasnformfeedback
UPDATE: This is working and up on gist now! Thanks Reto I am working on an Android implementation of transform feedback following this example. runs pretty well without any errors,
Solution 1:
Figured it out, thanks to Reto on this question. The outputs are actually not zeros. They are floats in reversed byte order, i.e. 4.6006E-41. Simply set the mapped buffer to native order and whallah!
ByteBuffer bb = ((ByteBuffer) mappedBuffer);
bb.order(ByteOrder.nativeOrder());
FloatBuffer transformedData = bb.asFloatBuffer();
Log.d(TAG, String.format("output values = %f %f %f %f %f\n", transformedData.get(),
transformedData.get(), transformedData.get(),
transformedData.get(), transformedData.get()));
Complete working code is up on gist
Post a Comment for "Glmapbufferrange() Returns All Zeros In Android Opengles 3.0 Using Trasnformfeedback"