PROTO::KLUDGE  0.1
Quick prototyping library for games using SDL and OpenGL.
DisplayInfo.hpp
Go to the documentation of this file.
1 #ifndef SYSTEMINFO_HPP
2 #define SYSTEMINFO_HPP
3 
4 #include <stdio.h>
5 #include <vector>
6 
7 #include <SDL2/SDL.h>
8 
9 namespace pk
10 {
11  namespace utilities
12  {
20  {
21  public:
26  DisplayInfo();
27 
28  ~DisplayInfo();
29 
37 
43  void printNumberOfDisplayModes(){ int m = 0; for(auto &i : m_numberOfDisplayModes){ printf("Display modes available on screen %i: %i\n", m, i); ++m; } };
44 
55  std::vector< std::vector<SDL_DisplayMode> > &getDisplayModes(){ return m_displayModes; };
56 
62  void printDisplayModes();
63 
64  private:
65  std::vector< std::vector<SDL_DisplayMode> > m_displayModes;
67  std::vector<int> m_numberOfDisplayModes;
68  };
69  }
70 }
71 #endif // SYSTEMINFO_HPP
void printNumberOfDisplayModes()
Print the number of display modes available for each screen on the user&#39;s system. ...
Definition: DisplayInfo.hpp:43
Class for storing and managing all game data and states. Game is implemented as a Singleton and also ...
Definition: DisplayInfo.hpp:19
Definition: Game.hpp:7
int m_numberOfDisplays
Number of displays on user&#39;s machine.
Definition: DisplayInfo.hpp:66
std::vector< std::vector< SDL_DisplayMode > > & getDisplayModes()
Get each available display mode in a 2D std::vector for each of the user&#39;s displays.
Definition: DisplayInfo.hpp:55
DisplayInfo()
Default constructor.
std::vector< std::vector< SDL_DisplayMode > > m_displayModes
All of the display modes on the platform.
Definition: DisplayInfo.hpp:65
void printDisplayModes()
Print all of the available display modes that exist on the users machine.
Definition: DisplayInfo.hpp:55
int getDisplayCount()
Definition: DisplayInfo.hpp:36
std::vector< int > m_numberOfDisplayModes
Number of display modes for each screen available.
Definition: DisplayInfo.hpp:67