]> git.tdb.fi Git - libs/gl.git/blob - source/core/backend.h
Check the flat qualifier from the correct member
[libs/gl.git] / source / core / backend.h
1 #ifndef MSP_GL_BACKEND_H_
2 #define MSP_GL_BACKEND_H_
3
4 #include <string>
5
6 namespace Msp {
7 namespace GL {
8
9 enum GraphicsApi
10 {
11         OPENGL,
12         OPENGL_ES,
13         VULKAN
14 };
15
16 struct Version
17 {
18         unsigned short major = 0;
19         unsigned short minor = 0;
20
21         Version() = default;
22         Version(unsigned short, unsigned short);
23         Version(const std::string &);
24
25         bool operator>=(const Version &) const;
26         bool operator<(const Version &o) const { return !(*this>=o); }
27         operator bool() const { return major || minor; }
28 };
29
30 /** Returns the backend for which the library was compiled. */
31 GraphicsApi get_backend_api();
32
33 } // namespace GL
34 } // namespace Msp
35
36 #endif