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  RendererID {
  UNINITIALIZED, DUMMY, SDL, SDLGL_PP,
  SDLGL_FB16, SDLGL_FB32
}
 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...
 
IntegerSettinggetMaxFrameSkipSetting ()
 The current max frameskip. More...
 
int getMaxFrameSkip () const
 
IntegerSettinggetMinFrameSkipSetting ()
 The current min frameskip. More...
 
int getMinFrameSkip () const
 
BooleanSettinggetFullScreenSetting ()
 Full screen [on, off]. More...
 
bool getFullScreen () const
 
FloatSettinggetGammaSetting ()
 The amount of gamma correction. More...
 
float getGamma () const
 
FloatSettinggetBrightnessSetting ()
 Brightness video setting. More...
 
float getBrightness () const
 
FloatSettinggetContrastSetting ()
 Contrast video setting. More...
 
float getContrast () const
 
StringSettinggetColorMatrixSetting ()
 Color matrix setting. More...
 
bool isColorMatrixIdentity ()
 Returns true iff the current color matrix is the identity matrix. More...
 
int getGlow () const
 The amount of glow [0..100]. More...
 
FloatSettinggetNoiseSetting ()
 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...
 
RendererSettinggetRendererSetting ()
 The current renderer. More...
 
RendererID getRenderer () const
 
ScaleAlgorithm getScaleAlgorithm () const
 The current scaling algorithm. More...
 
IntegerSettinggetScaleFactorSetting ()
 The current scaling factor. More...
 
int getScaleFactor () const
 
BooleanSettinggetLimitSpritesSetting ()
 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...
 
FloatSettinggetHorizontalStretchSetting ()
 Amount of horizontal stretch. More...
 
float getHorizontalStretch () const
 
FloatSettinggetPointerHideDelaySetting ()
 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...
 

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 21 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
ACC_SCREEN 
ACC_LINE 
ACC_PIXEL 

Definition at line 33 of file RenderSettings.hh.

◆ DisplayDeform

Enumerator
DEFORM_NORMAL 
DEFORM_3D 

Definition at line 43 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 
SDL 
SDLGL_PP 
SDLGL_FB16 
SDLGL_FB32 

Definition at line 27 of file RenderSettings.hh.

◆ ScaleAlgorithm

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.

Constructor & Destructor Documentation

◆ RenderSettings()

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

◆ ~RenderSettings()

openmsx::RenderSettings::~RenderSettings ( )

Member Function Documentation

◆ getAccuracy()

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

Accuracy [screen, line, pixel].

Definition at line 51 of file RenderSettings.hh.

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

Referenced by openmsx::V9990PixelRenderer::frameStart(), and openmsx::PixelRenderer::frameStart().

◆ getBlurFactor()

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

◆ getBrightness()

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

Definition at line 77 of file RenderSettings.hh.

References openmsx::FloatSetting::getDouble().

Referenced by ~RenderSettings().

◆ 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 136 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 81 of file RenderSettings.hh.

References openmsx::FloatSetting::getDouble().

Referenced by ~RenderSettings().

◆ getContrastSetting()

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

◆ getDeflicker()

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

Deflicker [on, off].

Definition at line 57 of file RenderSettings.hh.

References openmsx::BooleanSetting::getBoolean().

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

◆ getDeinterlace()

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

◆ getDisableSprites()

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

Disable sprite rendering?

Definition at line 132 of file RenderSettings.hh.

References openmsx::BooleanSetting::getBoolean().

Referenced by openmsx::V9990SDLRasterizer< Pixel >::drawDisplay().

◆ getDisplayDeform()

DisplayDeform openmsx::RenderSettings::getDisplayDeform ( )
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().

◆ getFullScreen()

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

◆ getFullScreenSetting()

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

Full screen [on, off].

Definition at line 68 of file RenderSettings.hh.

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

◆ getGamma()

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

Definition at line 73 of file RenderSettings.hh.

References openmsx::FloatSetting::getDouble().

Referenced by transformComponent(), and transformRGB().

◆ getGammaSetting()

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

◆ getGlow()

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

The amount of glow [0..100].

Definition at line 89 of file RenderSettings.hh.

References openmsx::IntegerSetting::getInt().

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

◆ 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 151 of file RenderSettings.hh.

Referenced by openmsx::GLPostProcessor::GLPostProcessor(), openmsx::GLPostProcessor::update(), and openmsx::GLPostProcessor::~GLPostProcessor().

◆ getInterleaveBlackFrame()

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

◆ 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 129 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

◆ getPointerHideDelay()

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

Definition at line 163 of file RenderSettings.hh.

References openmsx::FloatSetting::getDouble().

◆ 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 160 of file RenderSettings.hh.

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

◆ getRenderer()

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

◆ getRendererSetting()

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

The current renderer.

Definition at line 111 of file RenderSettings.hh.

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

◆ getScaleAlgorithm()

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

◆ getScaleFactor()

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

◆ getScaleFactorSetting()

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

◆ 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 106 of file RenderSettings.hh.

References openmsx::IntegerSetting::getInt().

Referenced by openmsx::GLTVScaler::scaleImage().

◆ 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 142 of file RenderSettings.hh.

◆ isColorMatrixIdentity()

bool openmsx::RenderSettings::isColorMatrixIdentity ( )
inline

Returns true iff the current color matrix is the identity matrix.

Definition at line 86 of file RenderSettings.hh.

Referenced by openmsx::V9990SDLRasterizer< Pixel >::drawDisplay(), and openmsx::SDLRasterizer< Pixel >::setTransparency().

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

References getGamma().

Referenced by openmsx::V9990SDLRasterizer< Pixel >::drawDisplay(), getInterleaveBlackFrame(), and openmsx::SDLRasterizer< Pixel >::setTransparency().

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

References openmsx::TclObject::getDouble(), getGamma(), openmsx::TclObject::getListIndex(), and openmsx::TclObject::getListLength().

Referenced by openmsx::V9990SDLRasterizer< Pixel >::drawDisplay(), getInterleaveBlackFrame(), and openmsx::SDLRasterizer< Pixel >::setTransparency().


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