]> git.tdb.fi Git - gldbg.git/blobdiff - flavors/gl/source/texturestate.cpp
Remove dependencies to MSP libraries to make compiling on embedded platforms easier
[gldbg.git] / flavors / gl / source / texturestate.cpp
index 187707c3fb49da96c6056715ee8083a903b3d5e3..2bb4a172bad5f4ef965d741af8483b6992ee0ce6 100644 (file)
@@ -1,16 +1,15 @@
 /* $Id$
 
 This file is part of gldbg
-Copyright © 2009  Mikko Rasa, Mikkosoft Productions
+Copyright © 2009-2011  Mikko Rasa, Mikkosoft Productions
 Distributed under the GPL
 */
 
-#include <msp/strings/formatter.h>
 #include "enums.h"
+#include "strformat.h"
 #include "texturestate.h"
 
 using namespace std;
-using namespace Msp;
 
 TexImageState::TexImageState():
        width(0),
@@ -29,14 +28,14 @@ void TexImageState::set_2d(GLenum ifmt, unsigned wd, unsigned ht)
 
 string TexImageState::describe() const
 {
-       string descr = format("%d", width);
+       string descr = strformat("%d", width);
        if(height)
        {
-               descr += format("x%d", height);
+               descr += strformat("x%d", height);
                if(depth)
-                       descr += format("x%d", height);
+                       descr += strformat("x%d", height);
        }
-       descr += format(", %s", describe_enum(internal_format, "PixelFormat"));
+       descr += strformat(", %s", describe_enum(internal_format, "PixelFormat"));
        return descr;
 }
 
@@ -103,7 +102,7 @@ string TextureState::describe() const
        if(images.empty())
                descr += ", undefined";
        else
-               descr += format(", %s", images.front().describe());
+               descr += ", "+images.front().describe();
        return descr;
 }
 
@@ -140,11 +139,11 @@ string TexUnitState::describe_binding(GLenum target) const
 {
        if(const TextureState *tex = get_current_texture(target))
        {
-               string descr = format("%d ", tex->id);
+               string descr = strformat("%d ", tex->id);
                if(tex->images.empty())
                        descr += "(undefined)";
                else
-                       descr += format("(%s)", tex->images.front().describe());
+                       descr += "("+tex->images.front().describe()+")";
                return descr;
        }
        else