X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=flavors%2Fgl%2Fsource%2Ftexturestate.cpp;h=314ff760d3b3c8f4487ffbb37ae4f1e5259e7104;hb=a832996c884a0e0acc9a38ba4dd258edb75ec7af;hp=187707c3fb49da96c6056715ee8083a903b3d5e3;hpb=f53057ce9b5eb3c7256a4aca95b4944733e14503;p=gldbg.git diff --git a/flavors/gl/source/texturestate.cpp b/flavors/gl/source/texturestate.cpp index 187707c..314ff76 100644 --- a/flavors/gl/source/texturestate.cpp +++ b/flavors/gl/source/texturestate.cpp @@ -1,16 +1,8 @@ -/* $Id$ - -This file is part of gldbg -Copyright © 2009 Mikko Rasa, Mikkosoft Productions -Distributed under the GPL -*/ - -#include #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