X-Git-Url: http://git.tdb.fi/?p=gldbg.git;a=blobdiff_plain;f=flavors%2Fgl%2Fsource%2Finspector.cpp;h=de8031b2f22931d429c27ac1dbd45fd922050352;hp=122c2e45298f340ddfe935a2f5e29375dcde480c;hb=bc201c7dd5ebef9c0db1142387715c7ad4d53b62;hpb=d72ef6d75a11f6cc05ab8ec039520719e1044741 diff --git a/flavors/gl/source/inspector.cpp b/flavors/gl/source/inspector.cpp index 122c2e4..de8031b 100644 --- a/flavors/gl/source/inspector.cpp +++ b/flavors/gl/source/inspector.cpp @@ -21,6 +21,8 @@ Inspector::Inspector(GlDbg &d): .set_help("Inspects general GL state", "state vertex\n" " Print current vertex attributes\n\n" + "state array\n" + " Show current vertex arrays\n\n" "state bind\n" " Show current bindings\n"); @@ -118,6 +120,28 @@ void Inspector::cmd_state(const string &args) const Vector3 &normal = glstate.get_normal(); printf(" Normal: [%05.3f, %05.3f, %05.3f]\n", normal.x, normal.y, normal.z); } + else if(args=="array") + { + printf("Current vertex arrays:\n"); + string descr = glstate.get_array(GL_VERTEX_ARRAY).describe(); + printf(" Vertex: %s\n", descr.c_str()); + descr = glstate.get_array(GL_NORMAL_ARRAY).describe(); + printf(" Normal: %s\n", descr.c_str()); + descr = glstate.get_array(GL_COLOR_ARRAY).describe(); + printf(" Color: %s\n", descr.c_str()); + unsigned count = glstate.get_max_texture_units(); + for(unsigned i=0; i=10 ? " " : " "), descr.c_str()); + } + } else if(args=="bind") { printf("Current bindings:\n");