2012-04-03 11:08:56 -05:00
|
|
|
#ifndef SAVERENDERER_H_
|
|
|
|
#define SAVERENDERER_H_
|
2019-12-17 08:03:41 -06:00
|
|
|
#include "Config.h"
|
2012-08-12 18:10:01 -05:00
|
|
|
#ifdef OGLI
|
2018-04-03 20:46:01 -05:00
|
|
|
#include "graphics/OpenGLHeaders.h"
|
2012-08-12 18:10:01 -05:00
|
|
|
#endif
|
2016-03-27 10:41:36 -05:00
|
|
|
#include "common/Singleton.h"
|
2019-04-16 17:23:57 -05:00
|
|
|
#include <mutex>
|
2012-04-03 11:08:56 -05:00
|
|
|
|
2012-08-12 16:32:57 -05:00
|
|
|
class GameSave;
|
2013-03-15 07:59:55 -05:00
|
|
|
class VideoBuffer;
|
2012-04-03 11:08:56 -05:00
|
|
|
class Graphics;
|
|
|
|
class Simulation;
|
|
|
|
class Renderer;
|
2012-08-12 16:32:57 -05:00
|
|
|
|
2012-04-03 11:08:56 -05:00
|
|
|
class SaveRenderer: public Singleton<SaveRenderer> {
|
|
|
|
Graphics * g;
|
|
|
|
Simulation * sim;
|
|
|
|
Renderer * ren;
|
2019-04-16 17:23:57 -05:00
|
|
|
std::mutex renderMutex;
|
2012-04-03 11:08:56 -05:00
|
|
|
public:
|
|
|
|
SaveRenderer();
|
2020-03-23 17:08:34 -05:00
|
|
|
VideoBuffer * Render(GameSave * save, bool decorations = true, bool fire = true, Renderer *renderModeSource = nullptr);
|
2013-03-15 07:59:55 -05:00
|
|
|
VideoBuffer * Render(unsigned char * saveData, int saveDataSize, bool decorations = true, bool fire = true);
|
2012-04-03 11:08:56 -05:00
|
|
|
virtual ~SaveRenderer();
|
2012-06-25 16:26:53 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
#if defined(OGLR) || defined(OGLI)
|
|
|
|
GLuint fboTex, fbo;
|
|
|
|
#endif
|
2012-04-03 11:08:56 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SAVERENDERER_H_ */
|