mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 11:22:45 +01:00
649f7b144d
This entirely replaces all remaining SFML pieces with SDL2 and brings OpenRW up to OpenGL 3.3
38 lines
665 B
C++
38 lines
665 B
C++
#ifndef _RWGAME_BENCHMARKSTATE_HPP_
|
|
#define _RWGAME_BENCHMARKSTATE_HPP_
|
|
|
|
#include <SDL2/SDL_events.h>
|
|
#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);
|
|
|
|
virtual void handleEvent(const SDL_Event& event);
|
|
|
|
const ViewCamera& getCamera();
|
|
};
|
|
|
|
#endif
|