X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fprofiler.h;h=4d5c5a834641300fe247730ca94dd3f1c3f7a79d;hb=7bd7fc784a6f6cff69f79914a445bc2115a7e768;hp=fa6bcac65c1ddce7b397f87e0fa38af13bc228a4;hpb=de6ac03ffc36843bbbb0d496007b3046a4422ee1;p=gldbg.git diff --git a/source/profiler.h b/source/profiler.h index fa6bcac..4d5c5a8 100644 --- a/source/profiler.h +++ b/source/profiler.h @@ -1,10 +1,18 @@ +/* $Id$ + +This file is part of gldbg +Copyright © 2010 Mikko Rasa, Mikkosoft Productions +Distributed under the GPL +*/ + #ifndef PROFILER_H_ #define PROFILER_H_ #include #include "gldecoder.h" +#include "tool.h" -class Profiler +class Profiler: public RegisteredTool { private: GlDecoder *decoder; @@ -16,12 +24,12 @@ private: unsigned triangles; public: - Profiler(); + Profiler(GlDbg &); - void enable(); - void disable(); - int decode(const char *, unsigned); + virtual void decode(const char *, unsigned); private: + void cmd_profile(const std::string &); + static void glDrawArrays(void *, GLenum, int, int); static void glDrawElements(void *, GLenum, int, GLenum, const void *); static void glDrawRangeElements(void *, GLenum, unsigned, unsigned, int, GLenum, const void *);