]> git.tdb.fi Git - libs/gl.git/blob - source/core/deviceinfo.h
Make the Limits struct more robust
[libs/gl.git] / source / core / deviceinfo.h
1 #ifndef MSP_GL_DEVICEINFO_H_
2 #define MSP_GL_DEVICEINFO_H_
3
4 #include "glsl/features.h"
5
6 namespace Msp {
7 namespace GL {
8
9 /**
10 Contains information about various limits imposed by the graphics device.
11 */
12 struct Limits
13 {
14         unsigned max_clip_planes = 6;
15         unsigned max_vertex_attributes = 16;
16         unsigned max_texture_bindings = 16;
17         unsigned max_color_attachments = 8;
18         unsigned max_samples = 4;
19         unsigned max_uniform_bindings = 24;
20         unsigned uniform_buffer_alignment = 256;
21
22         Limits();
23 };
24
25 /**
26 Contains information about a graphics device.
27 */
28 struct DeviceInfo
29 {
30         Limits limits;
31         SL::Features glsl_features;
32
33         DeviceInfo();
34
35         /** Returns information for the device currently in use. */
36         static const DeviceInfo &get_global();
37 };
38
39 } // namespace GL
40 } // namespace Msp
41
42 #endif