openMSX
|
Class containing all settings for renderers. More...
#include <RenderSettings.hh>
Public Types | |
enum class | RendererID { UNINITIALIZED , DUMMY , SDLGL_PP } |
Enumeration of Renderers known to openMSX. More... | |
enum class | Accuracy { SCREEN , LINE , PIXEL } |
Render accuracy: granularity of the rendered area. More... | |
enum class | ScaleAlgorithm { SIMPLE , SCALE , HQ , RGBTRIPLET , TV , NO } |
Scaler algorithm. More... | |
enum class | DisplayDeform { NORMAL , _3D } |
using | RendererSetting = EnumSetting< RendererID > |
Public Member Functions | |
RenderSettings (CommandController &commandController) | |
~RenderSettings () | |
EnumSetting< Accuracy > & | getAccuracySetting () |
Accuracy [screen, line, pixel]. | |
Accuracy | getAccuracy () const |
BooleanSetting & | getDeinterlaceSetting () |
Deinterlacing [on, off]. | |
bool | getDeinterlace () const |
BooleanSetting & | getDeflickerSetting () |
Deflicker [on, off]. | |
bool | getDeflicker () const |
IntegerSetting & | getMaxFrameSkipSetting () |
The current max frameskip. | |
int | getMaxFrameSkip () const |
IntegerSetting & | getMinFrameSkipSetting () |
The current min frameskip. | |
int | getMinFrameSkip () const |
BooleanSetting & | getFullScreenSetting () |
Full screen [on, off]. | |
bool | getFullScreen () const |
FloatSetting & | getGammaSetting () |
The amount of gamma correction. | |
float | getGamma () const |
FloatSetting & | getBrightnessSetting () |
Brightness video setting. | |
float | getBrightness () const |
FloatSetting & | getContrastSetting () |
Contrast video setting. | |
float | getContrast () const |
StringSetting & | getColorMatrixSetting () |
Color matrix setting. | |
bool | isColorMatrixIdentity () const |
Returns true iff the current color matrix is the identity matrix. | |
IntegerSetting & | getGlowSetting () |
The amount of glow [0..100]. | |
int | getGlow () const |
FloatSetting & | getNoiseSetting () |
The amount of noise to add to the frame. | |
float | getNoise () const |
IntegerSetting & | getBlurSetting () |
The amount of horizontal blur [0..256]. | |
int | getBlurFactor () const |
IntegerSetting & | getScanlineSetting () |
The alpha value [0..255] of the gap between scanlines. | |
int | getScanlineFactor () const |
float | getScanlineGap () const |
The amount of space [0..1] between scanlines. | |
RendererSetting & | getRendererSetting () |
The current renderer. | |
RendererID | getRenderer () const |
auto & | getScaleAlgorithmSetting () |
The current scaling algorithm. | |
ScaleAlgorithm | getScaleAlgorithm () const |
IntegerSetting & | getScaleFactorSetting () |
The current scaling factor. | |
int | getScaleFactor () const |
BooleanSetting & | getLimitSpritesSetting () |
Limit number of sprites per line? If true, limit number of sprites per line as real VDP does. | |
BooleanSetting & | getDisableSpritesSetting () |
Disable sprite rendering? | |
bool | getDisableSprites () const |
EnumSetting< bool > & | getCmdTimingSetting () |
CmdTiming [real, broken]. | |
EnumSetting< bool > & | getTooFastAccessSetting () |
TooFastAccess [real, ignored]. | |
auto & | getDisplayDeformSetting () |
Display deformation (normal, 3d). | |
DisplayDeform | getDisplayDeform () const |
BooleanSetting & | getVSyncSetting () |
VSync [on, off]. | |
FloatSetting & | getHorizontalStretchSetting () |
Amount of horizontal stretch. | |
float | getHorizontalStretch () const |
FloatSetting & | getPointerHideDelaySetting () |
The amount of time until the pointer is hidden in the openMSX window. | |
float | getPointerHideDelay () const |
bool | getInterleaveBlackFrame () const |
Is black frame interleaving enabled? | |
float | transformComponent (float c) const |
Apply brightness, contrast and gamma transformation on the input color component. | |
gl::vec3 | transformRGB (gl::vec3 rgb) const |
Apply brightness, contrast and gamma transformation on the input color. | |
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.
|
strong |
Render accuracy: granularity of the rendered area.
Enumerator | |
---|---|
SCREEN | |
LINE | |
PIXEL |
Definition at line 33 of file RenderSettings.hh.
|
strong |
Enumerator | |
---|---|
NORMAL | |
_3D |
Definition at line 42 of file RenderSettings.hh.
|
strong |
Enumeration of Renderers known to openMSX.
This is the full list, the list of available renderers may be smaller.
Enumerator | |
---|---|
UNINITIALIZED | |
DUMMY | |
SDLGL_PP |
Definition at line 28 of file RenderSettings.hh.
|
strong |
Scaler algorithm.
Enumerator | |
---|---|
SIMPLE | |
SCALE | |
HQ | |
RGBTRIPLET | |
TV | |
NO |
Definition at line 37 of file RenderSettings.hh.
|
explicit |
Definition at line 44 of file RenderSettings.cc.
References SCREEN.
openmsx::RenderSettings::~RenderSettings | ( | ) |
Definition at line 209 of file RenderSettings.cc.
|
inline |
Definition at line 51 of file RenderSettings.hh.
References openmsx::EnumSetting< T >::getEnum().
Referenced by openmsx::PixelRenderer::frameStart(), and openmsx::V9990PixelRenderer::frameStart().
|
inline |
Accuracy [screen, line, pixel].
Definition at line 50 of file RenderSettings.hh.
|
inline |
Definition at line 100 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::GLRGBScaler::scaleImage(), and openmsx::GLSimpleScaler::scaleImage().
|
inline |
The amount of horizontal blur [0..256].
Definition at line 99 of file RenderSettings.hh.
|
inline |
Definition at line 79 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
|
inline |
Brightness video setting.
Definition at line 78 of file RenderSettings.hh.
Referenced by openmsx::SDLRasterizer::SDLRasterizer(), openmsx::V9990SDLRasterizer::V9990SDLRasterizer(), openmsx::SDLRasterizer::~SDLRasterizer(), and openmsx::V9990SDLRasterizer::~V9990SDLRasterizer().
|
inline |
CmdTiming [real, broken].
This setting is intended for debugging only, not for users.
Definition at line 145 of file RenderSettings.hh.
Referenced by openmsx::V9990CmdEngine::V9990CmdEngine(), and openmsx::V9990CmdEngine::~V9990CmdEngine().
|
inline |
Color matrix setting.
Definition at line 86 of file RenderSettings.hh.
Referenced by openmsx::SDLRasterizer::SDLRasterizer(), openmsx::V9990SDLRasterizer::V9990SDLRasterizer(), openmsx::SDLRasterizer::~SDLRasterizer(), and openmsx::V9990SDLRasterizer::~V9990SDLRasterizer().
|
inline |
Definition at line 83 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
|
inline |
Contrast video setting.
Definition at line 82 of file RenderSettings.hh.
Referenced by openmsx::SDLRasterizer::SDLRasterizer(), openmsx::V9990SDLRasterizer::V9990SDLRasterizer(), openmsx::SDLRasterizer::~SDLRasterizer(), and openmsx::V9990SDLRasterizer::~V9990SDLRasterizer().
|
inline |
Definition at line 59 of file RenderSettings.hh.
References openmsx::BooleanSetting::getBoolean().
Referenced by openmsx::PostProcessor::rotateFrames().
|
inline |
Deflicker [on, off].
Definition at line 58 of file RenderSettings.hh.
|
inline |
Definition at line 55 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 |
Deinterlacing [on, off].
Definition at line 54 of file RenderSettings.hh.
|
inline |
Definition at line 141 of file RenderSettings.hh.
References openmsx::BooleanSetting::getBoolean().
Referenced by openmsx::V9990SDLRasterizer::drawDisplay().
|
inline |
Disable sprite rendering?
Definition at line 140 of file RenderSettings.hh.
|
inline |
Definition at line 155 of file RenderSettings.hh.
References openmsx::EnumSetting< T >::getEnum().
Referenced by openmsx::PostProcessor::paint().
|
inline |
Display deformation (normal, 3d).
Definition at line 154 of file RenderSettings.hh.
|
inline |
Definition at line 71 of file RenderSettings.hh.
References openmsx::BooleanSetting::getBoolean().
Referenced by openmsx::VisibleSurface::resize().
|
inline |
Full screen [on, off].
Definition at line 70 of file RenderSettings.hh.
Referenced by openmsx::SDLVideoSystem::SDLVideoSystem(), and openmsx::SDLVideoSystem::~SDLVideoSystem().
|
inline |
Definition at line 75 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
|
inline |
The amount of gamma correction.
Definition at line 74 of file RenderSettings.hh.
Referenced by openmsx::SDLRasterizer::SDLRasterizer(), openmsx::V9990SDLRasterizer::V9990SDLRasterizer(), openmsx::SDLRasterizer::~SDLRasterizer(), and openmsx::V9990SDLRasterizer::~V9990SDLRasterizer().
|
inline |
Definition at line 92 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::PostProcessor::paint().
|
inline |
The amount of glow [0..100].
Definition at line 91 of file RenderSettings.hh.
|
inline |
Definition at line 166 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
Referenced by openmsx::PostProcessor::paint(), and openmsx::PostProcessor::PostProcessor().
|
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 163 of file RenderSettings.hh.
Referenced by openmsx::PostProcessor::PostProcessor(), and openmsx::PostProcessor::~PostProcessor().
|
inline |
Is black frame interleaving enabled?
Definition at line 180 of file RenderSettings.hh.
References openmsx::BooleanSetting::getBoolean().
Referenced by openmsx::PostProcessor::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 137 of file RenderSettings.hh.
|
inline |
Definition at line 63 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 62 of file RenderSettings.hh.
Referenced by openmsx::PixelRenderer::PixelRenderer(), openmsx::V9990PixelRenderer::V9990PixelRenderer(), openmsx::PixelRenderer::~PixelRenderer(), and openmsx::V9990PixelRenderer::~V9990PixelRenderer().
|
inline |
Definition at line 67 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 66 of file RenderSettings.hh.
Referenced by openmsx::PixelRenderer::PixelRenderer(), openmsx::V9990PixelRenderer::V9990PixelRenderer(), openmsx::PixelRenderer::~PixelRenderer(), and openmsx::V9990PixelRenderer::~V9990PixelRenderer().
|
inline |
Definition at line 96 of file RenderSettings.hh.
References openmsx::FloatSetting::getFloat().
Referenced by openmsx::PostProcessor::PostProcessor().
|
inline |
The amount of noise to add to the frame.
Definition at line 95 of file RenderSettings.hh.
Referenced by openmsx::PostProcessor::PostProcessor(), and openmsx::PostProcessor::~PostProcessor().
|
inline |
Definition at line 175 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 172 of file RenderSettings.hh.
|
inline |
Definition at line 116 of file RenderSettings.hh.
References DUMMY, openmsx::EnumSetting< T >::getEnum(), and UNINITIALIZED.
Referenced by 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 115 of file RenderSettings.hh.
Referenced by openmsx::Display::Display(), and openmsx::Display::~Display().
|
inline |
Definition at line 123 of file RenderSettings.hh.
References openmsx::EnumSetting< T >::getEnum().
Referenced by openmsx::GLScalerFactory::createScaler(), and openmsx::PostProcessor::paint().
|
inline |
The current scaling algorithm.
Definition at line 122 of file RenderSettings.hh.
|
inline |
Definition at line 129 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::Display::getWindowSize().
|
inline |
The current scaling factor.
Definition at line 128 of file RenderSettings.hh.
Referenced by openmsx::SDLVideoSystem::SDLVideoSystem(), and openmsx::SDLVideoSystem::~SDLVideoSystem().
|
inline |
Definition at line 106 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 110 of file RenderSettings.hh.
References openmsx::IntegerSetting::getInt().
Referenced by openmsx::GLTVScaler::scaleImage().
|
inline |
The alpha value [0..255] of the gap between scanlines.
Definition at line 105 of file RenderSettings.hh.
|
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 151 of file RenderSettings.hh.
|
inline |
VSync [on, off].
Definition at line 158 of file RenderSettings.hh.
Referenced by openmsx::VisibleSurface::~VisibleSurface().
|
inline |
Returns true iff the current color matrix is the identity matrix.
Definition at line 88 of file RenderSettings.hh.
Referenced by openmsx::V9990SDLRasterizer::preCalcPalettes().
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 239 of file RenderSettings.cc.
Referenced by openmsx::V9990SDLRasterizer::preCalcPalettes().
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 245 of file RenderSettings.cc.
References g.
Referenced by openmsx::V9990SDLRasterizer::preCalcPalettes().