PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
pk::utilities::DisplayInfo Class Reference

Class for storing and managing all game data and states. Game is implemented as a Singleton and also uses the State pattern along with ScreenState subclasses. More...

#include <DisplayInfo.hpp>

Collaboration diagram for pk::utilities::DisplayInfo:
Collaboration graph

Public Member Functions

 DisplayInfo ()
 Default constructor. More...
 
 ~DisplayInfo ()
 
int getDisplayCount ()
 
void printNumberOfDisplayModes ()
 Print the number of display modes available for each screen on the user's system. More...
 
std::vector< std::vector< SDL_DisplayMode > > & getDisplayModes ()
 Get each available display mode in a 2D std::vector for each of the user's displays. More...
 
void printDisplayModes ()
 Print all of the available display modes that exist on the users machine. More...
 

Private Attributes

std::vector< std::vector< SDL_DisplayMode > > m_displayModes
 All of the display modes on the platform. More...
 
int m_numberOfDisplays
 Number of displays on user's machine. More...
 
std::vector< int > m_numberOfDisplayModes
 Number of display modes for each screen available. More...
 

Detailed Description

Class for storing and managing all game data and states. Game is implemented as a Singleton and also uses the State pattern along with ScreenState subclasses.

Constructor & Destructor Documentation

◆ DisplayInfo()

pk::utilities::DisplayInfo::DisplayInfo ( )

Default constructor.

◆ ~DisplayInfo()

pk::utilities::DisplayInfo::~DisplayInfo ( )

Member Function Documentation

◆ getDisplayCount()

int pk::utilities::DisplayInfo::getDisplayCount ( )
inline

◆ getDisplayModes()

std::vector< std::vector< SDL_DisplayMode > > & pk::utilities::DisplayInfo::getDisplayModes ( )
inline

Get each available display mode in a 2D std::vector for each of the user's displays.

Returns
std::vector< std::vector<SDL_DisplayMode> > - 2D std::vector of SDL_Display mode structures. Each contains the pixel format, the resolution given in width and height, the screen refresh rate, and a void* containing graphics driver information.

◆ printDisplayModes()

void pk::utilities::DisplayInfo::printDisplayModes ( )

Print all of the available display modes that exist on the users machine.

◆ printNumberOfDisplayModes()

void pk::utilities::DisplayInfo::printNumberOfDisplayModes ( )
inline

Print the number of display modes available for each screen on the user's system.

Member Data Documentation

◆ m_displayModes

std::vector< std::vector<SDL_DisplayMode> > pk::utilities::DisplayInfo::m_displayModes
private

All of the display modes on the platform.

◆ m_numberOfDisplayModes

std::vector<int> pk::utilities::DisplayInfo::m_numberOfDisplayModes
private

Number of display modes for each screen available.

◆ m_numberOfDisplays

int pk::utilities::DisplayInfo::m_numberOfDisplays
private

Number of displays on user's machine.


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