mkxp-sunshine/src/perftimer.h
Jonas Kulla 307eeb732d Factor out performance timers into separate files
This should make graphics.cpp somewhat easier to navigate/read.
GL_EXT_timer_query is also made optional, and if it's not present
dummy functions will be called instead.
2013-09-27 16:54:01 +02:00

18 lines
431 B
C

#ifndef PERFTIMER_H
#define PERFTIMER_H
struct PerfTimer
{
virtual ~PerfTimer() {}
virtual void startTiming() = 0;
virtual void endTiming() = 0;
};
/* Create timers that run on either CPU or GPU.
* After 'iter' pairs of startTiming()/endTiming(),
* they will calculate the average measurement and
* print it to the console */
PerfTimer *createGPUTimer(int iter);
PerfTimer *createCPUTimer(int iter);
#endif // PERFTIMER_H