openMSX
Public Types | Public Member Functions | List of all members
openmsx::RenderSettings Class Referencefinal

Class containing all settings for renderers. More...

#include <RenderSettings.hh>

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

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 , HQLITE ,
  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
 
BooleanSettinggetDeinterlaceSetting ()
 Deinterlacing [on, off].
 
bool getDeinterlace () const
 
BooleanSettinggetDeflickerSetting ()
 Deflicker [on, off].
 
bool getDeflicker () const
 
IntegerSettinggetMaxFrameSkipSetting ()
 The current max frameskip.
 
int getMaxFrameSkip () const
 
IntegerSettinggetMinFrameSkipSetting ()
 The current min frameskip.
 
int getMinFrameSkip () const
 
BooleanSettinggetFullScreenSetting ()
 Full screen [on, off].
 
bool getFullScreen () const
 
FloatSettinggetGammaSetting ()
 The amount of gamma correction.
 
float getGamma () const
 
FloatSettinggetBrightnessSetting ()
 Brightness video setting.
 
float getBrightness () const
 
FloatSettinggetContrastSetting ()
 Contrast video setting.
 
float getContrast () const
 
StringSettinggetColorMatrixSetting ()
 Color matrix setting.
 
bool isColorMatrixIdentity () const
 Returns true iff the current color matrix is the identity matrix.
 
IntegerSettinggetGlowSetting ()
 The amount of glow [0..100].
 
int getGlow () const
 
FloatSettinggetNoiseSetting ()
 The amount of noise to add to the frame.
 
float getNoise () const
 
IntegerSettinggetBlurSetting ()
 The amount of horizontal blur [0..256].
 
int getBlurFactor () const
 
IntegerSettinggetScanlineSetting ()
 The alpha value [0..255] of the gap between scanlines.
 
int getScanlineFactor () const
 
float getScanlineGap () const
 The amount of space [0..1] between scanlines.
 
RendererSettinggetRendererSetting ()
 The current renderer.
 
RendererID getRenderer () const
 
auto & getScaleAlgorithmSetting ()
 The current scaling algorithm.
 
ScaleAlgorithm getScaleAlgorithm () const
 
IntegerSettinggetScaleFactorSetting ()
 The current scaling factor.
 
int getScaleFactor () const
 
BooleanSettinggetLimitSpritesSetting ()
 Limit number of sprites per line? If true, limit number of sprites per line as real VDP does.
 
BooleanSettinggetDisableSpritesSetting ()
 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
 
BooleanSettinggetVSyncSetting ()
 VSync [on, off].
 
FloatSettinggetHorizontalStretchSetting ()
 Amount of horizontal stretch.
 
float getHorizontalStretch () const
 
FloatSettinggetPointerHideDelaySetting ()
 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.
 

Detailed Description

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.

Member Typedef Documentation

◆ RendererSetting

Definition at line 29 of file RenderSettings.hh.

Member Enumeration Documentation

◆ Accuracy

Render accuracy: granularity of the rendered area.

Enumerator
SCREEN 
LINE 
PIXEL 

Definition at line 33 of file RenderSettings.hh.

◆ DisplayDeform

Enumerator
NORMAL 
_3D 

Definition at line 42 of file RenderSettings.hh.

◆ RendererID

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.

◆ ScaleAlgorithm

Scaler algorithm.

Enumerator
SIMPLE 
SCALE 
HQ 
HQLITE 
RGBTRIPLET 
TV 
NO 

Definition at line 37 of file RenderSettings.hh.

Constructor & Destructor Documentation

◆ RenderSettings()

openmsx::RenderSettings::RenderSettings ( CommandController commandController)
explicit

Definition at line 45 of file RenderSettings.cc.

References SCREEN.

◆ ~RenderSettings()

openmsx::RenderSettings::~RenderSettings ( )

Definition at line 210 of file RenderSettings.cc.

Member Function Documentation

◆ getAccuracy()

Accuracy openmsx::RenderSettings::getAccuracy ( ) const
inline

◆ getAccuracySetting()

EnumSetting< Accuracy > & openmsx::RenderSettings::getAccuracySetting ( )
inline

Accuracy [screen, line, pixel].

Definition at line 50 of file RenderSettings.hh.

◆ getBlurFactor()

int openmsx::RenderSettings::getBlurFactor ( ) const
inline

◆ getBlurSetting()

IntegerSetting & openmsx::RenderSettings::getBlurSetting ( )
inline

The amount of horizontal blur [0..256].

Definition at line 99 of file RenderSettings.hh.

◆ getBrightness()

float openmsx::RenderSettings::getBrightness ( ) const
inline

Definition at line 79 of file RenderSettings.hh.

References openmsx::FloatSetting::getFloat().

◆ getBrightnessSetting()

FloatSetting & openmsx::RenderSettings::getBrightnessSetting ( )
inline

◆ getCmdTimingSetting()

EnumSetting< bool > & openmsx::RenderSettings::getCmdTimingSetting ( )
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().

◆ getColorMatrixSetting()

StringSetting & openmsx::RenderSettings::getColorMatrixSetting ( )
inline

◆ getContrast()

float openmsx::RenderSettings::getContrast ( ) const
inline

Definition at line 83 of file RenderSettings.hh.

References openmsx::FloatSetting::getFloat().

◆ getContrastSetting()

FloatSetting & openmsx::RenderSettings::getContrastSetting ( )
inline

◆ getDeflicker()

bool openmsx::RenderSettings::getDeflicker ( ) const
inline

◆ getDeflickerSetting()

BooleanSetting & openmsx::RenderSettings::getDeflickerSetting ( )
inline

Deflicker [on, off].

Definition at line 58 of file RenderSettings.hh.

◆ getDeinterlace()

bool openmsx::RenderSettings::getDeinterlace ( ) const
inline

◆ getDeinterlaceSetting()

BooleanSetting & openmsx::RenderSettings::getDeinterlaceSetting ( )
inline

Deinterlacing [on, off].

Definition at line 54 of file RenderSettings.hh.

◆ getDisableSprites()

bool openmsx::RenderSettings::getDisableSprites ( ) const
inline

◆ getDisableSpritesSetting()

BooleanSetting & openmsx::RenderSettings::getDisableSpritesSetting ( )
inline

Disable sprite rendering?

Definition at line 140 of file RenderSettings.hh.

◆ getDisplayDeform()

DisplayDeform openmsx::RenderSettings::getDisplayDeform ( ) const
inline

Definition at line 155 of file RenderSettings.hh.

References openmsx::EnumSetting< T >::getEnum().

Referenced by openmsx::PostProcessor::paint().

◆ getDisplayDeformSetting()

auto & openmsx::RenderSettings::getDisplayDeformSetting ( )
inline

Display deformation (normal, 3d).

Definition at line 154 of file RenderSettings.hh.

◆ getFullScreen()

bool openmsx::RenderSettings::getFullScreen ( ) const
inline

Definition at line 71 of file RenderSettings.hh.

References openmsx::BooleanSetting::getBoolean().

Referenced by openmsx::VisibleSurface::resize().

◆ getFullScreenSetting()

BooleanSetting & openmsx::RenderSettings::getFullScreenSetting ( )
inline

Full screen [on, off].

Definition at line 70 of file RenderSettings.hh.

Referenced by openmsx::SDLVideoSystem::SDLVideoSystem(), and openmsx::SDLVideoSystem::~SDLVideoSystem().

◆ getGamma()

float openmsx::RenderSettings::getGamma ( ) const
inline

Definition at line 75 of file RenderSettings.hh.

References openmsx::FloatSetting::getFloat().

◆ getGammaSetting()

FloatSetting & openmsx::RenderSettings::getGammaSetting ( )
inline

◆ getGlow()

int openmsx::RenderSettings::getGlow ( ) const
inline

Definition at line 92 of file RenderSettings.hh.

References openmsx::IntegerSetting::getInt().

Referenced by openmsx::PostProcessor::paint().

◆ getGlowSetting()

IntegerSetting & openmsx::RenderSettings::getGlowSetting ( )
inline

The amount of glow [0..100].

Definition at line 91 of file RenderSettings.hh.

◆ getHorizontalStretch()

float openmsx::RenderSettings::getHorizontalStretch ( ) const
inline

◆ getHorizontalStretchSetting()

FloatSetting & openmsx::RenderSettings::getHorizontalStretchSetting ( )
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().

◆ getInterleaveBlackFrame()

bool openmsx::RenderSettings::getInterleaveBlackFrame ( ) const
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().

◆ getLimitSpritesSetting()

BooleanSetting & openmsx::RenderSettings::getLimitSpritesSetting ( )
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.

◆ getMaxFrameSkip()

int openmsx::RenderSettings::getMaxFrameSkip ( ) const
inline

◆ getMaxFrameSkipSetting()

IntegerSetting & openmsx::RenderSettings::getMaxFrameSkipSetting ( )
inline

◆ getMinFrameSkip()

int openmsx::RenderSettings::getMinFrameSkip ( ) const
inline

◆ getMinFrameSkipSetting()

IntegerSetting & openmsx::RenderSettings::getMinFrameSkipSetting ( )
inline

◆ getNoise()

float openmsx::RenderSettings::getNoise ( ) const
inline

◆ getNoiseSetting()

FloatSetting & openmsx::RenderSettings::getNoiseSetting ( )
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().

◆ getPointerHideDelay()

float openmsx::RenderSettings::getPointerHideDelay ( ) const
inline

Definition at line 175 of file RenderSettings.hh.

References openmsx::FloatSetting::getFloat().

◆ getPointerHideDelaySetting()

FloatSetting & openmsx::RenderSettings::getPointerHideDelaySetting ( )
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.

◆ getRenderer()

RendererID openmsx::RenderSettings::getRenderer ( ) const
inline

◆ getRendererSetting()

RendererSetting & openmsx::RenderSettings::getRendererSetting ( )
inline

The current renderer.

Definition at line 115 of file RenderSettings.hh.

Referenced by openmsx::Display::Display(), and openmsx::Display::~Display().

◆ getScaleAlgorithm()

ScaleAlgorithm openmsx::RenderSettings::getScaleAlgorithm ( ) const
inline

◆ getScaleAlgorithmSetting()

auto & openmsx::RenderSettings::getScaleAlgorithmSetting ( )
inline

The current scaling algorithm.

Definition at line 122 of file RenderSettings.hh.

◆ getScaleFactor()

int openmsx::RenderSettings::getScaleFactor ( ) const
inline

Definition at line 129 of file RenderSettings.hh.

References openmsx::IntegerSetting::getInt().

Referenced by openmsx::Display::getWindowSize().

◆ getScaleFactorSetting()

IntegerSetting & openmsx::RenderSettings::getScaleFactorSetting ( )
inline

The current scaling factor.

Definition at line 128 of file RenderSettings.hh.

Referenced by openmsx::SDLVideoSystem::SDLVideoSystem(), and openmsx::SDLVideoSystem::~SDLVideoSystem().

◆ getScanlineFactor()

int openmsx::RenderSettings::getScanlineFactor ( ) const
inline

◆ getScanlineGap()

float openmsx::RenderSettings::getScanlineGap ( ) const
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().

◆ getScanlineSetting()

IntegerSetting & openmsx::RenderSettings::getScanlineSetting ( )
inline

The alpha value [0..255] of the gap between scanlines.

Definition at line 105 of file RenderSettings.hh.

◆ getTooFastAccessSetting()

EnumSetting< bool > & openmsx::RenderSettings::getTooFastAccessSetting ( )
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.

◆ getVSyncSetting()

BooleanSetting & openmsx::RenderSettings::getVSyncSetting ( )
inline

VSync [on, off].

Definition at line 158 of file RenderSettings.hh.

Referenced by openmsx::VisibleSurface::~VisibleSurface().

◆ isColorMatrixIdentity()

bool openmsx::RenderSettings::isColorMatrixIdentity ( ) const
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().

◆ transformComponent()

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 240 of file RenderSettings.cc.

Referenced by openmsx::V9990SDLRasterizer::preCalcPalettes().

◆ transformRGB()

vec3 openmsx::RenderSettings::transformRGB ( gl::vec3  rgb) const

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 246 of file RenderSettings.cc.

References g.

Referenced by openmsx::V9990SDLRasterizer::preCalcPalettes().


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