openMSX
|
Class containing all settings for renderers. More...
#include <RenderSettings.hh>
Public Types | |
enum | RendererID { UNINITIALIZED , DUMMY , SDL , SDLGL_PP } |
Enumeration of Renderers known to openMSX. More... | |
enum | Accuracy { ACC_SCREEN , ACC_LINE , ACC_PIXEL } |
Render accuracy: granularity of the rendered area. More... | |
enum | ScaleAlgorithm { SCALER_SIMPLE , SCALER_SAI , SCALER_SCALE , SCALER_HQ , SCALER_HQLITE , SCALER_RGBTRIPLET , SCALER_TV , SCALER_MLAA , NO_SCALER } |
Scaler algorithm. More... | |
enum | DisplayDeform { DEFORM_NORMAL , DEFORM_3D } |
using | RendererSetting = EnumSetting< RendererID > |
Public Member Functions | |
RenderSettings (CommandController &commandController) | |
~RenderSettings () | |
Accuracy | getAccuracy () const |
Accuracy [screen, line, pixel]. More... | |
bool | getDeinterlace () const |
Deinterlacing [on, off]. More... | |
bool | getDeflicker () const |
Deflicker [on, off]. More... | |
IntegerSetting & | getMaxFrameSkipSetting () |
The current max frameskip. More... | |
int | getMaxFrameSkip () const |
IntegerSetting & | getMinFrameSkipSetting () |
The current min frameskip. More... | |
int | getMinFrameSkip () const |
BooleanSetting & | getFullScreenSetting () |
Full screen [on, off]. More... | |
bool | getFullScreen () const |
FloatSetting & | getGammaSetting () |
The amount of gamma correction. More... | |
float | getGamma () const |
FloatSetting & | getBrightnessSetting () |
Brightness video setting. More... | |
float | getBrightness () const |
FloatSetting & | getContrastSetting () |
Contrast video setting. More... | |
float | getContrast () const |
StringSetting & | getColorMatrixSetting () |
Color matrix setting. More... | |
bool | isColorMatrixIdentity () const |
Returns true iff the current color matrix is the identity matrix. More... | |
int | getGlow () const |
The amount of glow [0..100]. More... | |
FloatSetting & | getNoiseSetting () |
The amount of noise to add to the frame. More... | |
float | getNoise () const |
int | getBlurFactor () const |
The amount of horizontal blur [0..256]. More... | |
int | getScanlineFactor () const |
The alpha value [0..255] of the gap between scanlines. More... | |
float | getScanlineGap () const |
The amount of space [0..1] between scanlines. More... | |
RendererSetting & | getRendererSetting () |
The current renderer. More... | |
RendererID | getRenderer () const |
ScaleAlgorithm | getScaleAlgorithm () const |
The current scaling algorithm. More... | |
IntegerSetting & | getScaleFactorSetting () |
The current scaling factor. More... | |
int | getScaleFactor () const |
BooleanSetting & | getLimitSpritesSetting () |
Limit number of sprites per line? If true, limit number of sprites per line as real VDP does. More... | |
bool | getDisableSprites () const |
Disable sprite rendering? More... | |
EnumSetting< bool > & | getCmdTimingSetting () |
CmdTiming [real, broken]. More... | |
EnumSetting< bool > & | getTooFastAccessSetting () |
TooFastAccess [real, ignored]. More... | |
DisplayDeform | getDisplayDeform () |
Display deformation (normal, 3d) ATM this only works when using the SDLGL-PP renderer. More... | |
BooleanSetting & | getVSyncSetting () |
VSync [on, off] ATM this only works when using the SDLGL-PP renderer. More... | |
FloatSetting & | getHorizontalStretchSetting () |
Amount of horizontal stretch. More... | |
float | getHorizontalStretch () const |
FloatSetting & | getPointerHideDelaySetting () |
The amount of time until the pointer is hidden in the openMSX window. More... | |
float | getPointerHideDelay () const |
bool | getInterleaveBlackFrame () const |
Is black frame interleaving enabled? More... | |
float | transformComponent (float c) const |
Apply brightness, contrast and gamma transformation on the input color component. More... | |
gl::vec3 | transformRGB (gl::vec3 rgb) const |
Apply brightness, contrast and gamma transformation on the input color. More... | |
Class containing all settings for renderers.
Keeping the settings here makes sure they are preserved when the user switches to another renderer.
Definition at line 22 of file RenderSettings.hh.
Definition at line 29 of file RenderSettings.hh.
Render accuracy: granularity of the rendered area.
Enumerator | |
---|---|
ACC_SCREEN | |
ACC_LINE | |
ACC_PIXEL |
Definition at line 33 of file RenderSettings.hh.
Enumerator | |
---|---|
DEFORM_NORMAL | |
DEFORM_3D |
Definition at line 43 of file RenderSettings.hh.
Enumeration of Renderers known to openMSX.
This is the full list, the list of available renderers may be smaller.
Enumerator | |
---|---|
UNINITIALIZED | |
DUMMY | |
SDL | |
SDLGL_PP |
Definition at line 28 of file RenderSettings.hh.
Scaler algorithm.
Enumerator | |
---|---|
SCALER_SIMPLE | |
SCALER_SAI | |
SCALER_SCALE | |
SCALER_HQ | |
SCALER_HQLITE | |
SCALER_RGBTRIPLET | |
SCALER_TV | |
SCALER_MLAA | |
NO_SCALER |
Definition at line 37 of file RenderSettings.hh.
|
explicit |
Definition at line 50 of file RenderSettings.cc.
References ACC_SCREEN.
openmsx::RenderSettings::~RenderSettings | ( | ) |
Definition at line 231 of file RenderSettings.cc.
|
inline |
Accuracy [screen, line, pixel].
Definition at line 51 of file RenderSettings.hh.
References openmsx::EnumSetting< T >::getEnum().
Referenced by openmsx::PixelRenderer::frameStart(), and openmsx::V9990PixelRenderer::frameStart().
|
inline |
The amount of horizontal blur [0..256].
Definition at line 96 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::GLRGBScaler::scaleImage(), and openmsx::GLSimpleScaler::scaleImage().
|
inline |
Definition at line 77 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
|
inline |
Brightness video setting.
Definition at line 76 of file RenderSettings.hh.
Referenced by openmsx::SDLRasterizer< Pixel >::SDLRasterizer(), and openmsx::V9990SDLRasterizer< Pixel >::V9990SDLRasterizer().
|
inline |
CmdTiming [real, broken].
This setting is intended for debugging only, not for users.
Definition at line 136 of file RenderSettings.hh.
Referenced by openmsx::V9990CmdEngine::V9990CmdEngine(), and openmsx::V9990CmdEngine::~V9990CmdEngine().
|
inline |
Color matrix setting.
Definition at line 84 of file RenderSettings.hh.
Referenced by openmsx::SDLRasterizer< Pixel >::SDLRasterizer(), and openmsx::V9990SDLRasterizer< Pixel >::V9990SDLRasterizer().
|
inline |
Definition at line 81 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
|
inline |
Contrast video setting.
Definition at line 80 of file RenderSettings.hh.
Referenced by openmsx::SDLRasterizer< Pixel >::SDLRasterizer(), and openmsx::V9990SDLRasterizer< Pixel >::V9990SDLRasterizer().
|
inline |
Deflicker [on, off].
Definition at line 57 of file RenderSettings.hh.
References openmsx::BooleanSetting::getBoolean().
Referenced by openmsx::PostProcessor::rotateFrames().
|
inline |
Deinterlacing [on, off].
Definition at line 54 of file RenderSettings.hh.
References openmsx::BooleanSetting::getBoolean().
Referenced by openmsx::PixelRenderer::frameEnd(), openmsx::V9990PixelRenderer::frameEnd(), openmsx::PixelRenderer::frameStart(), openmsx::V9990PixelRenderer::frameStart(), and openmsx::PostProcessor::rotateFrames().
|
inline |
Disable sprite rendering?
Definition at line 132 of file RenderSettings.hh.
References openmsx::BooleanSetting::getBoolean().
|
inline |
Display deformation (normal, 3d) ATM this only works when using the SDLGL-PP renderer.
Definition at line 146 of file RenderSettings.hh.
References openmsx::EnumSetting< T >::getEnum().
Referenced by openmsx::GLPostProcessor::paint().
|
inline |
Definition at line 69 of file RenderSettings.hh.
References openmsx::BooleanSetting::getBoolean().
Referenced by openmsx::SDLVideoSystem::checkSettings(), and openmsx::SDLGLVisibleSurface::SDLGLVisibleSurface().
|
inline |
Full screen [on, off].
Definition at line 68 of file RenderSettings.hh.
Referenced by openmsx::Display::Display(), and openmsx::Display::~Display().
|
inline |
Definition at line 73 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
|
inline |
The amount of gamma correction.
Definition at line 72 of file RenderSettings.hh.
Referenced by openmsx::SDLRasterizer< Pixel >::SDLRasterizer(), and openmsx::V9990SDLRasterizer< Pixel >::V9990SDLRasterizer().
|
inline |
The amount of glow [0..100].
Definition at line 89 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::GLPostProcessor::paint().
|
inline |
Definition at line 158 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
Referenced by openmsx::GLPostProcessor::GLPostProcessor(), and openmsx::GLPostProcessor::paint().
|
inline |
Amount of horizontal stretch.
This number represents the amount of MSX pixels (normal width) that will be stretched to the complete width of the host window.
Definition at line 155 of file RenderSettings.hh.
Referenced by openmsx::GLPostProcessor::GLPostProcessor(), and openmsx::GLPostProcessor::~GLPostProcessor().
|
inline |
Is black frame interleaving enabled?
Definition at line 172 of file RenderSettings.hh.
References openmsx::BooleanSetting::getBoolean().
Referenced by openmsx::GLPostProcessor::paint(), and openmsx::PostProcessor::rotateFrames().
|
inline |
Limit number of sprites per line? If true, limit number of sprites per line as real VDP does.
If false, display all sprites. For accurate emulation, this setting should be on. Turning it off can improve games with a lot of flashing sprites, such as Aleste.
Definition at line 129 of file RenderSettings.hh.
|
inline |
Definition at line 61 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::PixelRenderer::frameStart(), and openmsx::V9990PixelRenderer::frameStart().
|
inline |
The current max frameskip.
Definition at line 60 of file RenderSettings.hh.
Referenced by openmsx::PixelRenderer::PixelRenderer(), openmsx::V9990PixelRenderer::V9990PixelRenderer(), openmsx::PixelRenderer::~PixelRenderer(), and openmsx::V9990PixelRenderer::~V9990PixelRenderer().
|
inline |
Definition at line 65 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::PixelRenderer::frameStart(), and openmsx::V9990PixelRenderer::frameStart().
|
inline |
The current min frameskip.
Definition at line 64 of file RenderSettings.hh.
Referenced by openmsx::PixelRenderer::PixelRenderer(), openmsx::V9990PixelRenderer::V9990PixelRenderer(), openmsx::PixelRenderer::~PixelRenderer(), and openmsx::V9990PixelRenderer::~V9990PixelRenderer().
|
inline |
Definition at line 93 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
Referenced by openmsx::GLPostProcessor::GLPostProcessor().
|
inline |
The amount of noise to add to the frame.
Definition at line 92 of file RenderSettings.hh.
Referenced by openmsx::FBPostProcessor< Pixel >::FBPostProcessor(), openmsx::GLPostProcessor::GLPostProcessor(), and openmsx::GLPostProcessor::~GLPostProcessor().
|
inline |
Definition at line 167 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
|
inline |
The amount of time until the pointer is hidden in the openMSX window.
negative means: no hiding, 0 means immediately.
Definition at line 164 of file RenderSettings.hh.
Referenced by openmsx::VisibleSurface::~VisibleSurface().
|
inline |
Definition at line 112 of file RenderSettings.hh.
References openmsx::EnumSetting< T >::getEnum().
Referenced by openmsx::SDLVideoSystem::createLDRasterizer(), openmsx::RendererFactory::createLDRenderer(), openmsx::SDLVideoSystem::createRasterizer(), openmsx::RendererFactory::createRenderer(), openmsx::SDLVideoSystem::createV9990Rasterizer(), openmsx::RendererFactory::createV9990Renderer(), openmsx::Display::createVideoSystem(), and openmsx::RendererFactory::createVideoSystem().
|
inline |
The current renderer.
Definition at line 111 of file RenderSettings.hh.
Referenced by openmsx::Display::Display(), and openmsx::Display::~Display().
|
inline |
The current scaling algorithm.
Definition at line 115 of file RenderSettings.hh.
References openmsx::EnumSetting< T >::getEnum().
Referenced by openmsx::ScalerFactory< Pixel >::createScaler(), openmsx::GLScalerFactory::createScaler(), and openmsx::GLPostProcessor::paint().
|
inline |
Definition at line 121 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::ScalerFactory< Pixel >::createScaler().
|
inline |
The current scaling factor.
Definition at line 120 of file RenderSettings.hh.
Referenced by openmsx::Display::Display(), openmsx::SDLVideoSystem::SDLVideoSystem(), openmsx::Display::~Display(), and openmsx::SDLVideoSystem::~SDLVideoSystem().
|
inline |
The alpha value [0..255] of the gap between scanlines.
Definition at line 101 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::GLRGBScaler::scaleImage(), and openmsx::GLSimpleScaler::scaleImage().
|
inline |
The amount of space [0..1] between scanlines.
Definition at line 106 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::GLTVScaler::scaleImage().
|
inline |
TooFastAccess [real, ignored].
Indicates whether too fast VDP VRAM access should be correctly emulated (= some accesses are dropped) or ignored (= all accesses are correctly executed).
Definition at line 142 of file RenderSettings.hh.
|
inline |
VSync [on, off] ATM this only works when using the SDLGL-PP renderer.
Definition at line 150 of file RenderSettings.hh.
Referenced by openmsx::SDLGLVisibleSurface::SDLGLVisibleSurface(), and openmsx::SDLGLVisibleSurface::~SDLGLVisibleSurface().
|
inline |
Returns true iff the current color matrix is the identity matrix.
Definition at line 86 of file RenderSettings.hh.
float openmsx::RenderSettings::transformComponent | ( | float | c | ) | const |
Apply brightness, contrast and gamma transformation on the input color component.
The component is expected to be in the range [0.0 .. 1.0] but it's not an error if it lays outside of this range. The return value is guaranteed to lay inside this range. This method skips the cross-influence of color components on each other that is controlled by the "color_matrix" setting.
Definition at line 261 of file RenderSettings.cc.
Apply brightness, contrast and gamma transformation on the input color.
The R, G and B component are expected to be in the range [0.0 .. 1.0] but it's not an error if a component lays outside of this range. After transformation it's guaranteed all components lay inside this range.
Definition at line 267 of file RenderSettings.cc.
References g.