2016-04-19 02:20:54 +02:00
|
|
|
#ifndef _RWGAME_BENCHMARKSTATE_HPP_
|
|
|
|
#define _RWGAME_BENCHMARKSTATE_HPP_
|
|
|
|
|
|
|
|
#include "State.hpp"
|
|
|
|
|
|
|
|
class BenchmarkState : public State
|
|
|
|
{
|
|
|
|
struct TrackPoint {
|
|
|
|
float time;
|
|
|
|
glm::vec3 position;
|
|
|
|
glm::quat angle;
|
|
|
|
};
|
|
|
|
std::vector<TrackPoint> track;
|
|
|
|
|
|
|
|
ViewCamera trackCam;
|
|
|
|
|
|
|
|
std::string benchfile;
|
|
|
|
|
|
|
|
float benchmarkTime;
|
|
|
|
float duration;
|
|
|
|
uint32_t frameCounter;
|
|
|
|
public:
|
|
|
|
BenchmarkState(RWGame* game, const std::string& benchfile);
|
|
|
|
|
|
|
|
virtual void enter();
|
|
|
|
virtual void exit();
|
|
|
|
|
|
|
|
virtual void tick(float dt);
|
|
|
|
virtual void draw(GameRenderer* r);
|
|
|
|
|
2016-06-22 12:29:39 +02:00
|
|
|
virtual void handleEvent(const SDL_Event& event);
|
2016-04-19 02:20:54 +02:00
|
|
|
|
|
|
|
const ViewCamera& getCamera();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|