openMSX
SDLGLVisibleSurface.hh
Go to the documentation of this file.
1 #ifndef SDLGLVISIBLESURFACE_HH
2 #define SDLGLVISIBLESURFACE_HH
3 
4 #include "VisibleSurface.hh"
5 
6 namespace openmsx {
7 
10 class SDLGLVisibleSurface final : public VisibleSurface
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  ~SDLGLVisibleSurface() override;
20 
21  static void saveScreenshotGL(const OutputSurface& output,
22  const std::string& filename);
23 
24 private:
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  SDL_GLContext glContext;
37 };
38 
39 } // namespace openmsx
40 
41 #endif
Contains the main loop of openMSX.
Definition: Reactor.hh:66
Represents the output window/screen of openMSX.
Definition: Display.hh:31
A frame buffer where pixels can be written to.
static void saveScreenshotGL(const OutputSurface &output, const std::string &filename)
constexpr const char *const filename
An OutputSurface which is visible to the user, such as a window or a full screen display.
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
Visible surface for SDL openGL renderers.
SDLGLVisibleSurface(unsigned width, unsigned height, Display &display, RTScheduler &rtScheduler, EventDistributor &eventDistributor, InputEventGenerator &inputEventGenerator, CliComm &cliComm)