1 #ifndef MSP_GL_DEVICE_H_
2 #define MSP_GL_DEVICE_H_
4 #include <msp/graphics/window.h>
6 #include "device_backend.h"
7 #include "glsl/features.h"
13 Contains information about various limits imposed by the graphics device.
17 unsigned max_clip_planes = 6;
18 unsigned max_vertex_attributes = 16;
19 unsigned max_texture_bindings = 16;
20 unsigned max_color_attachments = 8;
21 unsigned max_samples = 4;
22 unsigned max_uniform_bindings = 24;
23 unsigned uniform_buffer_alignment = 256;
24 float max_anisotropy = 1.0f;
28 Contains information about a graphics device.
35 SL::Features glsl_features;
39 Represents a graphics device. An instance must be created to use the library.
41 class Device: public DeviceBackend
48 static Device *current;
51 Device(Graphics::Window &);
52 Device(Graphics::Window &, const DeviceOptions &);
55 using DeviceBackend::get_context;
56 const DeviceInfo &get_info() const { return info; }
58 static Device &get_current();