OXYGENHUB
◆ main openmsx / src / video / OffScreenSurface.hh
581 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
#ifndef OFFSCREENSURFACE_HH
2
#define OFFSCREENSURFACE_HH
3
4
#include "GLUtil.hh"
5
#include "OutputSurface.hh"
6
7
namespace openmsx {
8
9
/** This class installs a FrameBufferObject (FBO). So as long as this object
10
  * is live, all openGL draw commands will be redirected to this FBO.
11
  */
12
class OffScreenSurface final : public OutputSurface
13
{
14
public:
15
	explicit OffScreenSurface(const OutputSurface& output);
16
17
private:
18
	// OutputSurface
19
	void saveScreenshot(const std::string& filename) override;
20
21
private:
22
	gl::Texture fboTex;
23
	gl::FrameBufferObject fbo;
24
};
25
26
} // namespace openmsx
27
28
#endif