openMSX
|
A frame buffer where pixels can be written to. More...
#include <OutputSurface.hh>
Public Types | |
using | Pixel = uint32_t |
Public Member Functions | |
OutputSurface (const OutputSurface &)=delete | |
OutputSurface (OutputSurface &&)=delete | |
OutputSurface & | operator= (const OutputSurface &)=delete |
OutputSurface & | operator= (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 |
uint32_t | mapRGB (gl::vec3 rgb) const |
Returns the pixel value for the given RGB color. | |
uint32_t | mapRGB255 (gl::ivec3 rgb) const |
Same as mapRGB, but RGB components are in range [0..255]. | |
Pixel | getKeyColor () const |
Returns the color key for this output surface. | |
virtual void | saveScreenshot (const std::string &filename)=0 |
Save the content of this OutputSurface to a PNG file. | |
Protected Member Functions | |
OutputSurface ()=default | |
void | calculateViewPort (gl::ivec2 logSize, gl::ivec2 physSize) |
A frame buffer where pixels can be written to.
It could be an in-memory buffer or a video buffer visible to the user (see *OffScreenSurface and *VisibleSurface classes).
The OutputSurface class itself knows about its dimensions and pixel format. But the actual pixel storage is left for the subclasses.
Definition at line 20 of file OutputSurface.hh.
using openmsx::OutputSurface::Pixel = uint32_t |
Definition at line 23 of file OutputSurface.hh.
|
delete |
|
delete |
|
virtualdefault |
|
protecteddefault |
Definition at line 6 of file OutputSurface.cc.
Referenced by openmsx::OffScreenSurface::OffScreenSurface().
|
inline |
Returns the color key for this output surface.
Definition at line 60 of file OutputSurface.hh.
Referenced by openmsx::V9990SDLRasterizer::resetPalette(), and openmsx::V9990SDLRasterizer::setPalette().
|
inline |
Definition at line 32 of file OutputSurface.hh.
Referenced by openmsx::GLScopedClip::GLScopedClip().
|
inline |
Definition at line 33 of file OutputSurface.hh.
Referenced by openmsx::VisibleSurface::fullScreenUpdated(), openmsx::OSDTopWidget::getSize(), openmsx::OffScreenSurface::OffScreenSurface(), and openmsx::PostProcessor::paint().
|
inline |
Definition at line 31 of file OutputSurface.hh.
Referenced by openmsx::OSDWidget::getScaleFactor().
|
inline |
Definition at line 34 of file OutputSurface.hh.
Referenced by openmsx::OffScreenSurface::OffScreenSurface().
|
inline |
Definition at line 36 of file OutputSurface.hh.
Referenced by openmsx::GLScopedClip::GLScopedClip(), openmsx::PostProcessor::paint(), and openmsx::VisibleSurface::saveScreenshotGL().
|
inline |
Definition at line 38 of file OutputSurface.hh.
Referenced by openmsx::GLScopedClip::GLScopedClip().
|
inline |
Definition at line 37 of file OutputSurface.hh.
Referenced by openmsx::PostProcessor::paint(), and openmsx::VisibleSurface::saveScreenshotGL().
|
inline |
Returns the pixel value for the given RGB color.
No effort is made to ensure that the returned pixel value is not the color key for this output surface.
Definition at line 44 of file OutputSurface.hh.
References mapRGB255().
Referenced by openmsx::V9990SDLRasterizer::preCalcPalettes().
|
inline |
Same as mapRGB, but RGB components are in range [0..255].
Definition at line 51 of file OutputSurface.hh.
References openmsx::PixelOperations::combine(), and g.
Referenced by mapRGB(), and openmsx::V9990SDLRasterizer::preCalcPalettes().
|
delete |
|
delete |
|
pure virtual |
Save the content of this OutputSurface to a PNG file.
MSXException | If creating the PNG file fails. |
Implemented in openmsx::VisibleSurface.