openMSX
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
openmsx::SDLVisibleSurfaceBase Class Referenceabstract

Common functionality for the plain SDL and SDLGL VisibleSurface classes. More...

#include <SDLVisibleSurfaceBase.hh>

Inheritance diagram for openmsx::SDLVisibleSurfaceBase:
Inheritance graph
[legend]
Collaboration diagram for openmsx::SDLVisibleSurfaceBase:
Collaboration graph
[legend]

Public Member Functions

void updateWindowTitle () override
 
bool setFullScreen (bool fullscreen) override
 
 ~SDLVisibleSurfaceBase () override
 
- Public Member Functions inherited from openmsx::SDLOutputSurface
 SDLOutputSurface (const SDLOutputSurface &)=delete
 
SDLOutputSurfaceoperator= (const SDLOutputSurface &)=delete
 
SDL_Surface * getSDLSurface () const
 
SDL_Renderer * getSDLRenderer () const
 
SDLDirectPixelAccess getDirectPixelAccess ()
 Return a SDLDirectPixelAccess object. More...
 
virtual void flushFrameBuffer ()
 Copy frame buffer to display buffer. More...
 
virtual void clearScreen ()
 Clear frame buffer (paint it black). More...
 
- Public Member Functions inherited from openmsx::OutputSurface
 OutputSurface (const OutputSurface &)=delete
 
OutputSurfaceoperator= (const OutputSurface &)=delete
 
virtual ~OutputSurface ()=default
 
int getLogicalWidth () const
 
int getLogicalHeight () const
 
gl::ivec2 getLogicalSize () const
 
gl::ivec2 getPhysicalSize () const
 
gl::ivec2 getViewOffset () const
 
gl::ivec2 getViewSize () const
 
gl::vec2 getViewScale () const
 
bool isViewScaled () const
 
const PixelFormatgetPixelFormat () const
 
uint32_t mapRGB (gl::vec3 rgb) const
 Returns the pixel value for the given RGB color. More...
 
uint32_t mapRGB255 (gl::ivec3 rgb) const
 Same as mapRGB, but RGB components are in range [0..255]. More...
 
template<typename Pixel >
Pixel getKeyColor () const
 Returns the color key for this output surface. More...
 
template<typename Pixel >
Pixel getKeyColorClash () const
 Returns a color that is visually very close to the key color. More...
 
template<typename Pixel >
Pixel mapKeyedRGB255 (gl::ivec3 rgb)
 Returns the pixel value for the given RGB color. More...
 
template<typename Pixel >
Pixel mapKeyedRGB (gl::vec3 rgb)
 Returns the pixel value for the given RGB color. More...
 
virtual void saveScreenshot (const std::string &filename)=0
 Save the content of this OutputSurface to a PNG file. More...
 
- Public Member Functions inherited from openmsx::VisibleSurface
virtual ~VisibleSurface ()
 
virtual void finish ()=0
 When a complete frame is finished, call this method. More...
 
virtual std::unique_ptr< LayercreateSnowLayer ()=0
 
virtual std::unique_ptr< LayercreateConsoleLayer (Reactor &reactor, CommandConsole &console)=0
 
virtual std::unique_ptr< LayercreateOSDGUILayer (OSDGUI &gui)=0
 
virtual std::unique_ptr< OutputSurfacecreateOffScreenSurface ()=0
 Create an off-screen OutputSurface which has similar properties as this VisibleSurface. More...
 
CliCommgetCliComm () const
 
DisplaygetDisplay () const
 

Protected Member Functions

void createSurface (int width, int height, unsigned flags)
 
virtual void fullScreenUpdated (bool fullscreen)=0
 
 VisibleSurface (Display &display, RTScheduler &rtScheduler, EventDistributor &eventDistributor, InputEventGenerator &inputEventGenerator, CliComm &cliComm, VideoSystem &videoSystem)
 
- Protected Member Functions inherited from openmsx::SDLOutputSurface
 SDLOutputSurface ()=default
 
void setSDLPixelFormat (const SDL_PixelFormat &format)
 
void setSDLSurface (SDL_Surface *surface_)
 
void setSDLRenderer (SDL_Renderer *r)
 
- Protected Member Functions inherited from openmsx::OutputSurface
 OutputSurface ()=default
 
void calculateViewPort (gl::ivec2 logSize, gl::ivec2 physSize)
 
void setPixelFormat (const PixelFormat &format)
 
void setOpenGlPixelFormat ()
 
- Protected Member Functions inherited from openmsx::VisibleSurface
 VisibleSurface (Display &display, RTScheduler &rtScheduler, EventDistributor &eventDistributor, InputEventGenerator &inputEventGenerator, CliComm &cliComm, VideoSystem &videoSystem)
 
- Protected Member Functions inherited from openmsx::EventListener
 EventListener ()=default
 
 ~EventListener ()=default
 

Protected Attributes

SDLSubSystemInitializer< SDL_INIT_VIDEO > videoSubSystem
 
SDLWindowPtr window
 

Detailed Description

Common functionality for the plain SDL and SDLGL VisibleSurface classes.

Definition at line 12 of file SDLVisibleSurfaceBase.hh.

Constructor & Destructor Documentation

◆ ~SDLVisibleSurfaceBase()

openmsx::SDLVisibleSurfaceBase::~SDLVisibleSurfaceBase ( )
override

Definition at line 17 of file SDLVisibleSurfaceBase.cc.

References window.

Member Function Documentation

◆ createSurface()

void openmsx::SDLVisibleSurfaceBase::createSurface ( int  width,
int  height,
unsigned  flags 
)
protected

◆ fullScreenUpdated()

virtual void openmsx::SDLVisibleSurfaceBase::fullScreenUpdated ( bool  fullscreen)
protectedpure virtual

◆ setFullScreen()

bool openmsx::SDLVisibleSurfaceBase::setFullScreen ( bool  fullscreen)
overridevirtual

Implements openmsx::VisibleSurface.

Definition at line 88 of file SDLVisibleSurfaceBase.cc.

References fullScreenUpdated(), and window.

◆ updateWindowTitle()

void openmsx::SDLVisibleSurfaceBase::updateWindowTitle ( )
overridevirtual

Implements openmsx::VisibleSurface.

Definition at line 82 of file SDLVisibleSurfaceBase.cc.

References openmsx::VisibleSurface::getDisplay(), and window.

Referenced by createSurface().

◆ VisibleSurface()

openmsx::VisibleSurface::VisibleSurface
protected

Definition at line 55 of file VisibleSurface.cc.

Member Data Documentation

◆ videoSubSystem

SDLSubSystemInitializer<SDL_INIT_VIDEO> openmsx::SDLVisibleSurfaceBase::videoSubSystem
protected

Definition at line 24 of file SDLVisibleSurfaceBase.hh.

◆ window

SDLWindowPtr openmsx::SDLVisibleSurfaceBase::window
protected

The documentation for this class was generated from the following files: