![]() |
PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
|
Screen handler class. More...
#include <PureScreen.h>
Public Member Functions | |
virtual TPureBool | applyDisplaySettings (HDC dc, TPURE_SCREEN_PF pixelFormat=PURE_SCREEN_PF_SIMPLE)=0 |
Applies the set settings and the appropriate pixel format for the given HDC. | |
virtual void | ResetDisplaySettings ()=0 |
Resets the original display settings. | |
virtual TPureBool | isInitialized () const =0 |
Gets whether display settings are applied. | |
virtual TPureUInt | getResWidth () const =0 |
Gets the horizontal display resolution. | |
virtual TPureUInt | getResHeight () const =0 |
Gets the vertical display resolution. | |
virtual void | SetResolution (TPureUInt w, TPureUInt h)=0 |
Stores the given display resolution. | |
virtual TPureBool | isFullScreened () const =0 |
Gets whether we wanted fullscreen or not. | |
virtual void | SetFullScreened (TPureBool fs)=0 |
Stores whether we want fullscreen mode or not. | |
virtual TPureUInt | getFreq () const =0 |
Gets the stored display refresh rate. | |
virtual void | SetFreq (TPureUInt f)=0 |
Stores the needed display refresh rate. | |
virtual TPureInt | getColorBits () const =0 |
Gets the stored display color depth. | |
virtual void | SetColorBits (TPureInt c)=0 |
Stores the needed display color depth. | |
virtual TPureInt | getDepthBits () const =0 |
Gets the needed Z-buffer depth. | |
virtual void | SetDepthBits (TPureInt d)=0 |
Stores the needed Z-Buffer depth. | |
virtual TPureInt | getStencilBits () const =0 |
Gets the stored Stencil Buffer depth. | |
virtual void | SetStencilBits (TPureInt s)=0 |
Stores the needed Stencil Buffer depth. | |
virtual TPureBool | isScreensaverEnabled () const =0 |
Gets whether the screensaver is allowed or not while the engine is running. | |
virtual void | SetScreensaverEnabled (TPureBool state)=0 |
Sets whether the screensaver is allowed or not while the engine is running. | |
virtual TPureBool | isMonitorPowersaveEnabled () const =0 |
Gets whether monitor power saving is allowed or not while the engine is running. | |
virtual void | SetMonitorPowersaveEnabled (TPureBool state)=0 |
Sets whether monitor power saving is allowed or not while the engine is running. | |
virtual TPureBool | isStandbyEnabled () const =0 |
Gets whether computer standy is allowed or not while the engine is running. | |
virtual void | SetStandbyEnabled (TPureBool state)=0 |
Sets whether computer standy is allowed or not while the engine is running. | |
virtual TPureBool | isFSAAready () const =0 |
Gets whether the engine is ready to use FSAA. | |
virtual TPureInt | getFSAAlevel () const =0 |
Gets the actual FSAA-level. | |
virtual void | SetFSAAlevel (TPureInt level)=0 |
Sets the needed FSAA-level. | |
virtual TPureBool | isVSyncEnabled () const =0 |
Gets whether VSync is enabled or not. | |
virtual TPureBool | setVSyncEnabled (TPureBool state)=0 |
Sets the state of VSync. | |
Static Public Member Functions | |
static PureScreen & | createAndGet () |
Creates and gets the singleton instance. | |
static const char * | getLoggerModuleName () |
Returns the logger module name of this class. | |
Static Public Attributes | |
static constexpr char * | CVAR_GFX_VSYNC = "gfx_vsync" |
|
pure virtual |
Applies the set settings and the appropriate pixel format for the given HDC.
The following functions must be called before this:
Requesting an FSAA mode is complex a little bit: first call this method with pixelFormat = simple, then after initializing OpenGL, call this method again so an advanced pixel format will be selected. Then shutdown OpenGL, and close the previously created window, create a new window and call this method with pixelFormat = advanced. This time an FSAA-ready pixel format will be set so you can reinitialize OpenGL and enable FSAA in it.
Implemented in PureScreenImpl.
|
static |
Creates and gets the singleton instance.
Definition at line 765 of file PureScreen.cpp.
|
pure virtual |
Gets the stored display color depth.
Implemented in PureScreenImpl.
|
pure virtual |
Gets the needed Z-buffer depth.
Implemented in PureScreenImpl.
|
pure virtual |
Gets the stored display refresh rate.
Implemented in PureScreenImpl.
|
pure virtual |
Gets the actual FSAA-level.
Default value is 0.
Implemented in PureScreenImpl.
|
static |
Returns the logger module name of this class.
Intentionally not virtual, so derived class should hide this instead of overriding. Not even private, so user can also access this from outside, for any reason like controlling log filtering per logger module name.
Definition at line 779 of file PureScreen.cpp.
|
pure virtual |
Gets the vertical display resolution.
Should be used only after a successful applyDisplaySettings().
Implemented in PureScreenImpl.
|
pure virtual |
Gets the horizontal display resolution.
Should be used only after a successful applyDisplaySettings().
Implemented in PureScreenImpl.
|
pure virtual |
Gets the stored Stencil Buffer depth.
Implemented in PureScreenImpl.
|
pure virtual |
Gets whether the engine is ready to use FSAA.
Implemented in PureScreenImpl.
|
pure virtual |
Gets whether we wanted fullscreen or not.
Implemented in PureScreenImpl.
|
pure virtual |
Gets whether display settings are applied.
Implemented in PureScreenImpl.
|
pure virtual |
Gets whether monitor power saving is allowed or not while the engine is running.
Enabled by default.
Implemented in PureScreenImpl.
|
pure virtual |
Gets whether the screensaver is allowed or not while the engine is running.
Disabled by default.
Implemented in PureScreenImpl.
|
pure virtual |
Gets whether computer standy is allowed or not while the engine is running.
Disabled by default.
Implemented in PureScreenImpl.
|
pure virtual |
Gets whether VSync is enabled or not.
Disabled by default.
Implemented in PureScreenImpl.
|
pure virtual |
Resets the original display settings.
If no settings have been applied yet or not in fullscreen mode, the function has no effect.
Implemented in PureScreenImpl.
|
pure virtual |
Stores the needed display color depth.
Can be used only before applyDisplaySettings(), no effect otherwise. A call to applyDisplaySettings() is needed to apply the setting.
Implemented in PureScreenImpl.
|
pure virtual |
Stores the needed Z-Buffer depth.
Can be used only before applyDisplaySettings(), no effect otherwise. A call to applyDisplaySettings() is needed to apply the setting.
Implemented in PureScreenImpl.
|
pure virtual |
Stores the needed display refresh rate.
Can be used only before applyDisplaySettings(), no effect otherwise. The stored display refresh rate will be applied only in fullscreen mode by a successful applyDisplaySettings().
Implemented in PureScreenImpl.
|
pure virtual |
Sets the needed FSAA-level.
Default value is 0. Can be used only before applyDisplaySettings(), no effect otherwise. A call to applyDisplaySettings() is needed to apply the setting.
Implemented in PureScreenImpl.
|
pure virtual |
Stores whether we want fullscreen mode or not.
Can be used only before applyDisplaySettings(), no effect otherwise. A call to applyDisplaySettings() is needed to apply the setting.
Implemented in PureScreenImpl.
|
pure virtual |
Sets whether monitor power saving is allowed or not while the engine is running.
Enabled by default.
Implemented in PureScreenImpl.
Stores the given display resolution.
Can be used only before applyDisplaySettings(), no effect otherwise. If w or h is 0, the target width and height will be the current screen resolution. If the current screen resolution can't be queried, the target will be 800x600. A call to applyDisplaySettings() is needed to apply the stored display resolution.
Implemented in PureScreenImpl.
|
pure virtual |
Sets whether the screensaver is allowed or not while the engine is running.
Disabled by default.
Implemented in PureScreenImpl.
|
pure virtual |
Sets whether computer standy is allowed or not while the engine is running.
Disabled by default.
Implemented in PureScreenImpl.
|
pure virtual |
Stores the needed Stencil Buffer depth.
Can be used only before applyDisplaySettings(), no effect otherwise. A call to applyDisplaySettings() is needed to apply the setting.
Implemented in PureScreenImpl.
Sets the state of VSync.
Default state is false. No effect if VSync is not supported.
Implemented in PureScreenImpl.
|
staticconstexpr |
Definition at line 44 of file PureScreen.h.