Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions | Variables
inexor::rendering::screen Namespace Reference

Classes

class  ScreenManager
 The screen manager manages the SDL window. More...
 

Functions

 ICOMMAND (screenres,"ii",(int *w, int *h), screen_manager.screenres(*w,*h))
 
 VARF (scr_w, SCR_MINW,-1, SCR_MAXW, screen_manager.screenres(scr_w,-1))
 change screen width and height More...
 
 VARF (scr_h, SCR_MINH,-1, SCR_MAXH, screen_manager.screenres(-1, scr_h))
 
 VAR (colorbits, 0, 0, 32)
 various buffer precisions and anti aliasing More...
 
 VARF (depthbits, 0, 0, 32, initwarning("depth-buffer precision"))
 
 VARF (stencilbits, 0, 0, 32, initwarning("stencil-buffer precision"))
 
 VARFP (vsync, 0, 0, 1, screen_manager.restorevsync())
 VSYNC settings. More...
 
 VARFP (vsynctear, 0, 0, 1,{if(vsync) screen_manager.restorevsync();})
 
 VARF (fsaa,-1,-1, 16, initwarning("anti-aliasing"))
 
 VARF (fullscreen, 0, 1, 1, screen_manager.setfullscreen(fullscreen!=0))
 
 VARFP (gamma, 30, 100, 300,{if(gamma==screen_manager.curgamma) return;screen_manager.curgamma=gamma;if(SDL_SetWindowBrightness(screen_manager.sdl_window, gamma/100.0f)==-1) Log.std->error("Could not set gamma: {}", SDL_GetError());})
 screen gamma as float value More...
 

Variables

SharedVar< int > fullscreen
 
SharedVar< int > scr_w
 
SharedVar< int > scr_h
 
SharedVar< int > vsync
 
ScreenManager screen_manager
 Singleton instnace of the screenmanager. More...
 
SharedVar< int > vsynctear
 
SharedVar< int > colorbits
 
SharedVar< int > depthbits
 
SharedVar< int > stencilbits
 
SharedVar< int > fsaa
 
int screenw
 
int screenh
 

Function Documentation

inexor::rendering::screen::ICOMMAND ( screenres  ,
"ii"  ,
(int *w, int *h)  ,
screen_manager.screenres *,*  h 
)
inexor::rendering::screen::VAR ( colorbits  ,
,
,
32   
)

various buffer precisions and anti aliasing

See Also
initwarning
inexor::rendering::screen::VARF ( scr_w  ,
SCR_MINW  ,
1,
SCR_MAXW  ,
screen_manager.  screenresscr_w,-1 
)

change screen width and height

inexor::rendering::screen::VARF ( scr_h  ,
SCR_MINH  ,
1,
SCR_MAXH  ,
screen_manager.  screenres-1, scr_h 
)
inexor::rendering::screen::VARF ( depthbits  ,
,
,
32  ,
initwarning("depth-buffer precision")   
)
inexor::rendering::screen::VARF ( stencilbits  ,
,
,
32  ,
initwarning("stencil-buffer precision")   
)
inexor::rendering::screen::VARF ( fsaa  ,
1,
1,
16  ,
initwarning("anti-aliasing")   
)
inexor::rendering::screen::VARF ( fullscreen  ,
,
,
,
screen_manager.  setfullscreenfullscreen!=0 
)
Warning
do not go full screen in debug mode (doesn't work with MSVC)
inexor::rendering::screen::VARFP ( vsync  ,
,
,
,
screen_manager.  restorevsync() 
)

VSYNC settings.

inexor::rendering::screen::VARFP ( vsynctear  ,
,
,
,
{if(vsync) screen_manager.restorevsync();}   
)
inexor::rendering::screen::VARFP ( gamma  ,
30  ,
100  ,
300  ,
{if(gamma==screen_manager.curgamma) return;screen_manager.curgamma=gamma;if(SDL_SetWindowBrightness(screen_manager.sdl_window, gamma/100.0f)==-1) Log.std->error("Could not set gamma: {}", SDL_GetError());}   
)

screen gamma as float value

Variable Documentation

SharedVar<int> inexor::rendering::screen::colorbits

Referenced by writeinitcfg().

SharedVar<int> inexor::rendering::screen::depthbits
SharedVar<int> inexor::rendering::screen::fsaa
SharedVar< int > inexor::rendering::screen::fullscreen
SharedVar< int > inexor::rendering::screen::scr_h
SharedVar< int > inexor::rendering::screen::scr_w
ScreenManager inexor::rendering::screen::screen_manager
int inexor::rendering::screen::screenh
int inexor::rendering::screen::screenw
SharedVar<int> inexor::rendering::screen::stencilbits
SharedVar< int > inexor::rendering::screen::vsync
SharedVar<int> inexor::rendering::screen::vsynctear