Gamedev Framework (gf)  0.5.0
A C++11 framework for 2D games
GraphicsInfo.h
1 /*
2  * Gamedev Framework (gf)
3  * Copyright (C) 2016-2017 Julien Bernard
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  * 2. Altered source versions must be plainly marked as such, and must not be
18  * misrepresented as being the original software.
19  * 3. This notice may not be removed or altered from any source distribution.
20  */
21 #ifndef GF_GRAPHICS_INFO_H
22 #define GF_GRAPHICS_INFO_H
23 
24 #include <string>
25 #include <vector>
26 
27 #include "Portability.h"
28 #include "Vector.h"
29 
30 namespace gf {
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
32 inline namespace v1 {
33 #endif
34 
46  class GF_API GraphicsInfo {
47  public:
51  GraphicsInfo() = delete;
52 
58  static std::string getVendor();
59 
65  static std::string getRenderer();
66 
72  static std::string getVersion();
73 
79  static std::string getShadingLanguageVersion();
80 
86  static std::vector<std::string> getExtensions();
87 
91  struct Format {
92  int symbol;
93  std::string name;
94  };
95 
101  static std::vector<Format> getCompressedTextureFormats();
102 
108  static std::vector<Format> getShaderBinaryFormats();
109 
115  static int getMaxCombinedTextureImageUnits();
116 
122  static int getMaxCubeMapTextureSize();
123 
130  static int getMaxFragmentUniformVectors();
131 
137  static int getMaxRenderbufferSize();
138 
144  static int getMaxTextureImageUnits();
145 
151  static int getMaxTextureSize();
152 
159  static int getMaxVaryingVectors();
160 
167  static int getMaxVertexAttribs();
168 
174  static int getMaxVertexTextureImageUnits();
175 
182  static int getMaxVertexUniformVectors();
183 
189  static Vector2i getMaxViewportDims();
190 
196  static int getSubpixelBits();
197 
198  };
199 
200 #ifndef DOXYGEN_SHOULD_SKIP_THIS
201 }
202 #endif
203 }
204 
205 #endif // GF_GRAPHICS_INFO_H
int symbol
Symbolic constant to represent the format.
Definition: GraphicsInfo.h:92
An OpenGL format.
Definition: GraphicsInfo.h:91
The namespace for gf classes.
Definition: Action.h:34
std::string name
Name of the constant for the format or "UNKNOWN".
Definition: GraphicsInfo.h:93
A class for graphics info.
Definition: GraphicsInfo.h:46