+/* $Id$
+
+This file is part of gldbg
+Copyright © 2010 Mikko Rasa, Mikkosoft Productions
+Distributed under the GPL
+*/
+
#ifndef PROFILER_H_
#define PROFILER_H_
#include <msp/time/timestamp.h>
#include "gldecoder.h"
+#include "tool.h"
-class Profiler
+class Profiler: public RegisteredTool<Profiler>
{
private:
GlDecoder *decoder;
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 *);