Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
RenderingConfig Class Reference

Configuration containing parameters for windows and renderers. More...

#include <Config.hpp>

Public Member Functions

 RenderingConfig (const std::vector< std::string > &argv)
 
glm::vec2 renderingResolution ()
 
- Public Member Functions inherited from Config
 Config (const std::vector< std::string > &argv)
 
bool showHelp ()
 

Public Attributes

const size_t version = 1
 The configuration version number (unused).
 
bool vsync = true
 Toggle V-Sync.
 
int rate = 60
 Prefered framerate.
 
bool fullscreen = false
 Toggle fullscreen window.
 
unsigned int initialWidth = 1000
 Initial width of the window in relative pixels.
 
unsigned int initialHeight = 750
 Initial height of the window in relative pixels.
 
int internalVerticalResolution = 720
 Internal vertical rendering resolution. More...
 
bool forceAspectRatio = false
 Should the aspect ratio of the window be constrained.
 
glm::vec2 screenResolution = glm::vec2(800.0f, 600.0f)
 Size of the window in raw pixels, updated at launch based on screen density.
 
glm::ivec4 windowFrame = glm::vec4(0, 0, 800, 600)
 The last recorded window position and size on screen.
 
std::string resourcesPath
 Extra resources directory.
 
bool trackDebug = true
 Should resource tracking and monitoring be enabled.
 

Additional Inherited Members

- Protected Member Functions inherited from Config
const std::vector< KeyValues > & arguments () const
 
void registerSection (const std::string &name)
 
void registerArgument (const std::string &longName, const std::string &shortName, const std::string &details, const std::vector< std::string > &params={})
 
void registerArgument (const std::string &longName, const std::string &shortName, const std::string &details, const std::string &param)
 

Detailed Description

Configuration containing parameters for windows and renderers.

Inherits Config.

Inherited by AtmosphereConfig, GameConfig, PathTracerConfig, and ShaderEditorConfig.

Constructor & Destructor Documentation

◆ RenderingConfig()

RenderingConfig::RenderingConfig ( const std::vector< std::string > &  argv)
explicit

Initialize a new rendering config object, parsing the input arguments and filling the attributes with their values.

Parameters
argvthe raw input arguments

Member Function Documentation

◆ renderingResolution()

glm::vec2 RenderingConfig::renderingResolution ( )

Compute the rendering resolution based on internal settings.

Returns
the rendering resolution

Member Data Documentation

◆ internalVerticalResolution

int RenderingConfig::internalVerticalResolution = 720

Internal vertical rendering resolution.

Note
The width should be computed based on the window aspect ratio.

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