]> git.tdb.fi Git - gldbg.git/blobdiff - flavors/gl/source/bufferstate.cpp
Remove dependencies to MSP libraries to make compiling on embedded platforms easier
[gldbg.git] / flavors / gl / source / bufferstate.cpp
index c8b9f1348e1858196be5115bb3b9e48704614680..5060e15e21fa2a359080be9dfbf64c305c789cf4 100644 (file)
@@ -1,18 +1,17 @@
 /* $Id$
 
 This file is part of gldbg
-Copyright © 2009-2010  Mikko Rasa, Mikkosoft Productions
+Copyright © 2009-2011  Mikko Rasa, Mikkosoft Productions
 Distributed under the GPL
 */
 
-#include <msp/strings/formatter.h>
 #include "arraysize.h"
 #include "arraystate.h"
 #include "bufferstate.h"
 #include "enums.h"
+#include "strformat.h"
 
 using namespace std;
-using namespace Msp;
 
 BufferContent::BufferContent():
        consistent(true),
@@ -113,7 +112,7 @@ string BufferContent::describe() const
 
                if(!result.empty())
                        result += '_';
-               result += format("%c%d%s", kind, i->size, type);
+               result += strformat("%c%d%s", kind, i->size, type);
        }
 
        return result;
@@ -170,9 +169,9 @@ string BufferState::describe() const
        if(content.stride)
        {
                const char *what = (content.arrays.front().kind==GL_ELEMENT_ARRAY_BUFFER ? "indices" : "vertices");
-               return format("%s, %d %s (%d bytes), %s",
-                       content.describe(), size/content.stride, what, size, describe_enum(usage, ""));
+               return content.describe()+strformat(", %d %s (%d bytes), %s",
+                       size/content.stride, what, size, describe_enum(usage, ""));
        }
        else
-               return format("%d bytes, %s", size, describe_enum(usage, ""));
+               return strformat("%d bytes, %s", size, describe_enum(usage, ""));
 }