rag
graphic 2d engine
Screen.h
1 #ifndef Rag_Screen_h
2 #define Rag_Screen_h
3 
4 #include <glm/glm.hpp>
5 
6 namespace rag
7 {
8 
10 class Screen
11 {
12 public:
13 
14  static int width;
15  static int height;
16  static glm::vec2 center;
17 
18  static int realWidth;
19  static int realHeight;
20 
21  static float scale;
22  static float scaleBest;
23  static float factorX;
24  static float factorY;
25 
26  static bool isTablet;
27  static bool isLowPerformer;
28  static bool isLowRes;
29 };
30 
31 } // rag
32 
33 #endif
static bool isLowPerformer
True for low end devices.
Definition: Screen.h:27
static float scaleBest
Maximum scale where no deformation occurs.
Definition: Screen.h:22
static int width
Virtual width of the screen. Shared across all devices.
Definition: Screen.h:14
static bool isTablet
True if the device is considered a table instead of a phone.
Definition: Screen.h:26
static int height
Virtual height of the screen. Shared across all devices.
Definition: Screen.h:15
Definition: Bitmap.h:8
static int realWidth
Actual number of pixels of width in the screen.
Definition: Screen.h:18
static int realHeight
Actual number of pixels of height in the screen.
Definition: Screen.h:19
static glm::vec2 center
Virtual center of the screen. Shared across all devices.
Definition: Screen.h:16
static float factorY
Factor used to maintain screen height coordinates independent from resolution or aspect ratio...
Definition: Screen.h:24
static float factorX
Factor used to maintain screen width coordinates independent from resolution or aspect ratio...
Definition: Screen.h:23
static bool isLowRes
True for devices with low resolution screens.
Definition: Screen.h:28
static float scale
Apple scale.
Definition: Screen.h:21
Contains information about the current device.
Definition: Screen.h:10