GLES2Dbg: reconstruct vertex attributes to match indices
Rather than converting glDrawElements into glDrawArrays and
uploading all attributes each draw call.
Also added CaptureDraw and CaptureSwap options.
Change-Id: If8ac6556a2674868ce83f074ce4068a6af2d3a0e
Signed-off-by: David Li <davidxli@google.com>
diff --git a/tools/glesv2debugger/generate_MessageParser_java.py b/tools/glesv2debugger/generate_MessageParser_java.py
index 0c5934b..9078d8e 100755
--- a/tools/glesv2debugger/generate_MessageParser_java.py
+++ b/tools/glesv2debugger/generate_MessageParser_java.py
@@ -81,25 +81,31 @@
ByteString ParseFloats(int count) {
ByteBuffer buffer = ByteBuffer.allocate(count * 4);
+ buffer.order(SampleView.targetByteOrder);
String [] arg = GetList();
for (int i = 0; i < count; i++)
buffer.putFloat(Float.parseFloat(arg[i].trim()));
+ buffer.rewind();
return ByteString.copyFrom(buffer);
}
ByteString ParseInts(int count) {
ByteBuffer buffer = ByteBuffer.allocate(count * 4);
+ buffer.order(SampleView.targetByteOrder);
String [] arg = GetList();
for (int i = 0; i < count; i++)
buffer.putInt(Integer.parseInt(arg[i].trim()));
+ buffer.rewind();
return ByteString.copyFrom(buffer);
}
ByteString ParseUInts(int count) {
ByteBuffer buffer = ByteBuffer.allocate(count * 4);
+ buffer.order(SampleView.targetByteOrder);
String [] arg = GetList();
for (int i = 0; i < count; i++)
buffer.putInt((int)(Long.parseLong(arg[i].trim()) & 0xffffffff));
+ buffer.rewind();
return ByteString.copyFrom(buffer);
}