Mana
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Video Class Reference

#include <video.h>

Public Member Functions

 Video ()=default
 
 ~Video ()
 
const VideoSettingssettings () const
 
SDL_Window * window () const
 
Graphicsgraphics () const
 
Graphicsinitialize (const VideoSettings &settings)
 Try to create a window with the given settings.
 
bool apply (const VideoSettings &settings)
 Try to apply the given video settings.
 
void updateWindowSize ()
 Handles a change in window size, possibly adjusting the scale.
 
void present ()
 Present the next frame.
 
const DisplayModedesktopDisplayMode () const
 
const std::vector< DisplayMode > & displayModes () const
 

Private Member Functions

bool initDisplayModes ()
 

Private Attributes

VideoSettings mSettings
 
DisplayMode mDesktopDisplayMode
 
std::vector< DisplayModemDisplayModes
 
std::unique_ptr< GraphicsmGraphics
 
SDL_Window * mWindow = nullptr
 
bool mWindowShown = false
 

Detailed Description

Definition at line 71 of file video.h.

Constructor & Destructor Documentation

◆ Video()

Video::Video ( )
default

◆ ~Video()

Video::~Video ( )

Definition at line 58 of file video.cpp.

Member Function Documentation

◆ apply()

bool Video::apply ( const VideoSettings settings)

Try to apply the given video settings.

Definition at line 174 of file video.cpp.

◆ desktopDisplayMode()

const DisplayMode & Video::desktopDisplayMode ( ) const
inline

Definition at line 101 of file video.h.

◆ displayModes()

const std::vector< DisplayMode > & Video::displayModes ( ) const
inline

Definition at line 106 of file video.h.

◆ graphics()

Graphics * Video::graphics ( ) const
inline

Definition at line 79 of file video.h.

◆ initDisplayModes()

bool Video::initDisplayModes ( )
private

Definition at line 269 of file video.cpp.

◆ initialize()

Graphics * Video::initialize ( const VideoSettings settings)

Try to create a window with the given settings.

Definition at line 66 of file video.cpp.

◆ present()

void Video::present ( )

Present the next frame.

Definition at line 258 of file video.cpp.

◆ settings()

const VideoSettings & Video::settings ( ) const
inline

Definition at line 77 of file video.h.

◆ updateWindowSize()

void Video::updateWindowSize ( )

Handles a change in window size, possibly adjusting the scale.

Definition at line 250 of file video.cpp.

◆ window()

SDL_Window * Video::window ( ) const
inline

Definition at line 78 of file video.h.

Member Data Documentation

◆ mDesktopDisplayMode

DisplayMode Video::mDesktopDisplayMode
private

Definition at line 115 of file video.h.

◆ mDisplayModes

std::vector<DisplayMode> Video::mDisplayModes
private

Definition at line 116 of file video.h.

◆ mGraphics

std::unique_ptr<Graphics> Video::mGraphics
private

Definition at line 117 of file video.h.

◆ mSettings

VideoSettings Video::mSettings
private

Definition at line 114 of file video.h.

◆ mWindow

SDL_Window* Video::mWindow = nullptr
private

Definition at line 118 of file video.h.

◆ mWindowShown

bool Video::mWindowShown = false
private

Definition at line 119 of file video.h.


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