1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-15 15:02:34 +02:00
openrw/rwgame/states/BenchmarkState.hpp
2019-01-20 20:00:00 +01:00

47 lines
893 B
C++

#ifndef _RWGAME_BENCHMARKSTATE_HPP_
#define _RWGAME_BENCHMARKSTATE_HPP_
#include "State.hpp"
#include <render/ViewCamera.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/vec3.hpp>
#include <string>
#include <vector>
class BenchmarkState final : public State {
struct TrackPoint {
float time;
glm::vec3 position{};
glm::quat angle{1.0f,0.0f,0.0f,0.0f};
};
std::vector<TrackPoint> track;
ViewCamera trackCam;
std::string benchfile;
float benchmarkTime{0.f};
float duration{0.f};
uint32_t frameCounter{0};
public:
BenchmarkState(RWGame* game, const std::string& benchfile);
void enter() override;
void exit() override;
void tick(float dt) override;
void draw(GameRenderer &r) override;
void handleEvent(const SDL_Event& event) override;
const ViewCamera& getCamera(float) override;
};
#endif