X-Git-Url: http://git.tdb.fi/?p=gldbg.git;a=blobdiff_plain;f=flavors%2Fgl%2Fsource%2Fbufferstate.cpp;h=5060e15e21fa2a359080be9dfbf64c305c789cf4;hp=c8b9f1348e1858196be5115bb3b9e48704614680;hb=81f1ddee977603293d0c5710f2db69130dac6a96;hpb=a51c2557622ea93944e24f58845609526eb46ec1 diff --git a/flavors/gl/source/bufferstate.cpp b/flavors/gl/source/bufferstate.cpp index c8b9f13..5060e15 100644 --- a/flavors/gl/source/bufferstate.cpp +++ b/flavors/gl/source/bufferstate.cpp @@ -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 #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, "")); }