openMSX
SDLGLVisibleSurface.hh
Go to the documentation of this file.
1 #ifndef SDLGLVISIBLESURFACE_HH
2 #define SDLGLVISIBLESURFACE_HH
3 
5 
6 namespace openmsx {
7 
11 {
12 public:
13  SDLGLVisibleSurface(unsigned width, unsigned height,
14  Display& display,
15  RTScheduler& rtScheduler,
16  EventDistributor& eventDistributor,
17  InputEventGenerator& inputEventGenerator,
18  CliComm& cliComm,
19  VideoSystem& videoSystem);
20  ~SDLGLVisibleSurface() override;
21 
22  static void saveScreenshotGL(const OutputSurface& output,
23  const std::string& filename);
24 
25  // OutputSurface
26  void saveScreenshot(const std::string& filename) override;
27 
28  // VisibleSurface
29  void finish() override;
30  std::unique_ptr<Layer> createSnowLayer() override;
31  std::unique_ptr<Layer> createConsoleLayer(
32  Reactor& reactor, CommandConsole& console) override;
33  std::unique_ptr<Layer> createOSDGUILayer(OSDGUI& gui) override;
34  std::unique_ptr<OutputSurface> createOffScreenSurface() override;
35 
36 private:
37  SDL_GLContext glContext;
38 };
39 
40 } // namespace openmsx
41 
42 #endif
openmsx::SDLGLVisibleSurface::saveScreenshotGL
static void saveScreenshotGL(const OutputSurface &output, const std::string &filename)
Definition: SDLGLVisibleSurface.cc:95
openmsx::SDLVisibleSurfaceBase
Common functionality for the plain SDL and SDLGL VisibleSurface classes.
Definition: SDLVisibleSurfaceBase.hh:12
openmsx::SDLGLVisibleSurface::finish
void finish() override
When a complete frame is finished, call this method.
Definition: SDLGLVisibleSurface.cc:110
openmsx::InputEventGenerator
Definition: InputEventGenerator.hh:18
openmsx::SDLGLVisibleSurface::createOSDGUILayer
std::unique_ptr< Layer > createOSDGUILayer(OSDGUI &gui) override
Definition: SDLGLVisibleSurface.cc:129
openmsx::SDLGLVisibleSurface
Visible surface for SDL openGL renderers.
Definition: SDLGLVisibleSurface.hh:10
openmsx::SDLGLVisibleSurface::createConsoleLayer
std::unique_ptr< Layer > createConsoleLayer(Reactor &reactor, CommandConsole &console) override
Definition: SDLGLVisibleSurface.cc:120
openmsx::RTScheduler
Definition: RTScheduler.hh:19
openmsx::VideoSystem
Video back-end system.
Definition: VideoSystem.hh:20
openmsx::SDLGLVisibleSurface::createSnowLayer
std::unique_ptr< Layer > createSnowLayer() override
Definition: SDLGLVisibleSurface.cc:115
openmsx::EventDistributor
Definition: EventDistributor.hh:16
openmsx::Reactor
Contains the main loop of openMSX.
Definition: Reactor.hh:66
openmsx::OSDGUI
Definition: OSDGUI.hh:13
openmsx::filename
constexpr const char *const filename
Definition: FirmwareSwitch.cc:10
openmsx::SDLGLVisibleSurface::SDLGLVisibleSurface
SDLGLVisibleSurface(unsigned width, unsigned height, Display &display, RTScheduler &rtScheduler, EventDistributor &eventDistributor, InputEventGenerator &inputEventGenerator, CliComm &cliComm, VideoSystem &videoSystem)
Definition: SDLGLVisibleSurface.cc:16
openmsx::SDLGLVisibleSurface::saveScreenshot
void saveScreenshot(const std::string &filename) override
Save the content of this OutputSurface to a PNG file.
Definition: SDLGLVisibleSurface.cc:90
SDLVisibleSurfaceBase.hh
openmsx::Display
Represents the output window/screen of openMSX.
Definition: Display.hh:31
openmsx::SDLGLVisibleSurface::~SDLGLVisibleSurface
~SDLGLVisibleSurface() override
Definition: SDLGLVisibleSurface.cc:84
openmsx::OutputSurface
A frame buffer where pixels can be written to.
Definition: OutputSurface.hh:19
openmsx::CliComm
Definition: CliComm.hh:10
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::SDLGLVisibleSurface::createOffScreenSurface
std::unique_ptr< OutputSurface > createOffScreenSurface() override
Create an off-screen OutputSurface which has similar properties as this VisibleSurface.
Definition: SDLGLVisibleSurface.cc:134
openmsx::CommandConsole
Definition: CommandConsole.hh:64