X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fdebug.h;h=d873ea379a9019241385b8106196fd1c503c6a1e;hp=b2de993da648e39a06a8f8f93d03c112b596cd39;hb=ed3bfcde8987c646157f5450a24c2f5368b3ec9a;hpb=7b1e95a0515f50b74886cba05db0518b1864d179 diff --git a/source/glsl/debug.h b/source/glsl/debug.h index b2de993d..d873ea37 100644 --- a/source/glsl/debug.h +++ b/source/glsl/debug.h @@ -22,6 +22,16 @@ private: REACH = 0x2574 // ╴ }; + struct Branch + { + std::string text; + Node *node; + + Branch(const char *t, Node *n = 0): text(t), node(n) { } + Branch(const std::string &t, Node *n = 0): text(t), node(n) { } + Branch(Node *n): node(n) { } + }; + std::map node_labels; std::string formatted; std::vector tree; @@ -31,6 +41,7 @@ public: private: void append(const std::string &); + void append_subtree(const std::vector &); void begin_sub(); void last_branch(); void end_sub();