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>
This commit is contained in:
@@ -81,25 +81,31 @@ public abstract class MessageParser {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user