]> git.tdb.fi Git - gldbg.git/blobdiff - flavors/gl/source/texturestate.cpp
Replace per-file license notices with License.txt
[gldbg.git] / flavors / gl / source / texturestate.cpp
index 187707c3fb49da96c6056715ee8083a903b3d5e3..314ff760d3b3c8f4487ffbb37ae4f1e5259e7104 100644 (file)
@@ -1,16 +1,8 @@
-/* $Id$
-
-This file is part of gldbg
-Copyright © 2009  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 +21,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 +95,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 +132,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