OSDN Git Service

GLES2Dbg: noop - format & comment
authorDavid Li <davidxli@google.com>
Thu, 21 Apr 2011 21:15:10 +0000 (14:15 -0700)
committerDavid Li <davidxli@google.com>
Thu, 21 Apr 2011 21:15:10 +0000 (14:15 -0700)
Change-Id: Ibb36508181d4322e236b6595b28d253f282c36d7
Signed-off-by: David Li <davidxli@google.com>
opengl/libs/GLES2_dbg/generate_api_cpp.py
opengl/libs/GLES2_dbg/generate_debugger_message_proto.py

index aeba213..96cde57 100755 (executable)
@@ -38,7 +38,7 @@ def generate_api(lines):
 "glShaderSource", "glTexImage2D", "glTexSubImage2D"]
 
     # these also needs to be forwarded to DbgContext
-    contextFunctions = ["glUseProgram", "glEnableVertexAttribArray", "glDisableVertexAttribArray", 
+    contextFunctions = ["glUseProgram", "glEnableVertexAttribArray", "glDisableVertexAttribArray",
 "glVertexAttribPointer", "glBindBuffer", "glBufferData", "glBufferSubData", "glDeleteBuffers",]
 
     for line in lines:
@@ -114,10 +114,10 @@ def generate_api(lines):
                     else:
                         getData += "    msg.mutable_data()->assign(reinterpret_cast<const char *>(%s), %s * sizeof(%s));" % (paramName, annotation, paramType)
                     paramType += "*"
-                else:     
+                else:
                     if paramType == "GLfloat" or paramType == "GLclampf" or paramType.find("*") >= 0:
                         setMsgParameters += "    msg.set_arg%d(ToInt(%s));\n" % (paramIndex, paramName)
-                    else: 
+                    else:
                         setMsgParameters += "    msg.set_arg%d(%s);\n" % (paramIndex, paramName)
                 if paramIndex < len(parameters) - 1:
                         arguments += ', '
@@ -156,7 +156,7 @@ def generate_api(lines):
     } caller;"""
             print setCallerMembers
             print setMsgParameters
-    
+
             if line.find("*") >= 0 or line.find(":") >= 0:
                 print "    // FIXME: check for pointer usage"
             if inout in ["in", "inout"]:
index 57e008c..535b13e 100755 (executable)
@@ -25,7 +25,7 @@ def generate_egl_entries(output, lines, i):
             line = line.split(",")[1].strip() #extract EGL function name
             output.write("        %s = %d;\n" % (line, i))
             i += 1
-    return i    
+    return i
 
 
 def generate_gl_entries(output,lines,i):
@@ -118,7 +118,7 @@ message Message
     optional int32 arg4 = 16;
     optional int32 arg5 = 17;
     optional int32 arg6 = 18;
-    optional int32 arg7 = 19;
+    optional int32 arg7 = 19; // glDrawArrays/Elements sets this to active number of attributes
     optional int32 arg8 = 20;
 
     optional bytes data = 10; // variable length data used for GL call