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_storage_texture_bindings = 8;
21 unsigned max_color_attachments = 8;
22 unsigned max_samples = 4;
23 unsigned max_uniform_bindings = 24;
24 unsigned uniform_buffer_alignment = 256;
25 float max_anisotropy = 1.0f;
29 Contains information about a graphics device.
36 SL::Features glsl_features;
40 Represents a graphics device. An instance must be created to use the library.
42 class Device: public DeviceBackend
49 static Device *current;
52 Device(Graphics::Window &);
53 Device(Graphics::Window &, const DeviceOptions &);
56 using DeviceBackend::get_context;
57 const DeviceInfo &get_info() const { return info; }
59 static Device &get_current();