X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fdevice.h;fp=source%2Fcore%2Fdevice.h;h=6a6a76080fed875ec165622ef5b194b5a3539586;hb=f0414f06fc2463e9765c9492dce60e0468dceb3c;hp=0000000000000000000000000000000000000000;hpb=ac4218f733b4c8f09b64e72164bd4321a4c1abd2;p=libs%2Fgl.git diff --git a/source/core/device.h b/source/core/device.h new file mode 100644 index 00000000..6a6a7608 --- /dev/null +++ b/source/core/device.h @@ -0,0 +1,32 @@ +#ifndef MSP_GL_DEVICE_H_ +#define MSP_GL_DEVICE_H_ + +#include +#include "device_backend.h" + +namespace Msp { +namespace GL { + +/** +Represents a graphics device. An instance must be created to use the library. +*/ +class Device: public DeviceBackend +{ + friend DeviceBackend; + +private: + static Device *current; + +public: + Device(Graphics::Window &, const DeviceOptions & = DeviceOptions()); + ~Device(); + + using DeviceBackend::get_context; + + static Device &get_current(); +}; + +} // namespace GL +} // namespace Msp + +#endif