openMSX
SDLGLVisibleSurface.hh
Go to the documentation of this file.
1 #ifndef SDLGLVISIBLESURFACE_HH
2 #define SDLGLVISIBLESURFACE_HH
3 
4 #include "VisibleSurface.hh"
5 #include "SDLGLOutputSurface.hh"
6 
7 namespace openmsx {
8 
11 class SDLGLVisibleSurface final : public VisibleSurface
12  , public SDLGLOutputSurface
13 {
14 public:
15  SDLGLVisibleSurface(unsigned width, unsigned height,
16  Display& display,
17  RTScheduler& rtScheduler,
18  EventDistributor& eventDistributor,
19  InputEventGenerator& inputEventGenerator,
20  CliComm& cliComm,
21  FrameBuffer frameBuffer = FB_NONE);
22  ~SDLGLVisibleSurface() override;
23 
24 private:
25  // OutputSurface
26  void flushFrameBuffer() override;
27  void saveScreenshot(const std::string& filename) override;
28  void clearScreen() override;
29 
30  // VisibleSurface
31  void finish() override;
32  std::unique_ptr<Layer> createSnowLayer() override;
33  std::unique_ptr<Layer> createConsoleLayer(
34  Reactor& reactor, CommandConsole& console) override;
35  std::unique_ptr<Layer> createOSDGUILayer(OSDGUI& gui) override;
36  std::unique_ptr<OutputSurface> createOffScreenSurface() override;
37 
38  SDL_GLContext glContext;
39 };
40 
41 } // namespace openmsx
42 
43 #endif
Contains the main loop of openMSX.
Definition: Reactor.hh:66
Represents the output window/screen of openMSX.
Definition: Display.hh:31
SDLGLVisibleSurface(unsigned width, unsigned height, Display &display, RTScheduler &rtScheduler, EventDistributor &eventDistributor, InputEventGenerator &inputEventGenerator, CliComm &cliComm, FrameBuffer frameBuffer=FB_NONE)
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 openGL renderers, both SDLGL-PP and SDLGL-FBxx.
This is a common base class for SDLGLVisibleSurface and SDLGLOffScreenSurface.
FrameBuffer
These correspond respectively with the renderers: SDLGL-PP, SDLGL-FB16, SDLGL-FB32.