The-Powder-Toy/src/simulation/SaveRenderer.h

34 lines
774 B
C
Raw Normal View History

#ifndef SAVERENDERER_H_
#define SAVERENDERER_H_
2019-12-17 08:03:41 -06:00
#include "Config.h"
#ifdef OGLI
#include "graphics/OpenGLHeaders.h"
#endif
#include "common/Singleton.h"
2019-04-16 17:23:57 -05:00
#include <mutex>
class GameSave;
2013-03-15 07:59:55 -05:00
class VideoBuffer;
class Graphics;
class Simulation;
class Renderer;
class SaveRenderer: public Singleton<SaveRenderer> {
Graphics * g;
Simulation * sim;
Renderer * ren;
2019-04-16 17:23:57 -05:00
std::mutex renderMutex;
public:
SaveRenderer();
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);
virtual ~SaveRenderer();
private:
#if defined(OGLR) || defined(OGLI)
GLuint fboTex, fbo;
#endif
};
#endif /* SAVERENDERER_H_ */