boo/include/x11/CGLXContext.hpp

34 lines
812 B
C++
Raw Normal View History

2015-04-18 21:54:41 +00:00
#ifndef CGLXCONTEXT_HPP
#define CGLXCONTEXT_HPP
2015-04-19 00:37:52 +00:00
#if !defined(__APPLE__) && (defined(__linux__) || defined(BSD))
2015-04-18 21:54:41 +00:00
#include <GL/glx.h>
2015-04-19 00:11:59 +00:00
#include <IGraphicsContext.hpp>
2015-04-18 21:54:41 +00:00
2015-04-19 00:11:59 +00:00
class CGLXContext final : public IGraphicsContext
2015-04-18 21:54:41 +00:00
{
public:
CGLXContext();
virtual ~CGLXContext() {}
2015-04-18 23:12:22 +00:00
bool create();
void setMajorVersion(const int& maj) override;
void setMinVersion(const int& min) override;
2015-04-18 21:54:41 +00:00
const std::string version() const override;
const std::string name() const override;
int depthSize() const override;
int redDepth() const override;
int greenDepth() const override;
int blueDepth() const override;
private:
int m_majVersion;
2015-04-18 23:12:22 +00:00
int m_minVersion;
Display* m_display;
2015-04-18 21:54:41 +00:00
};
2015-04-19 00:37:52 +00:00
#endif // !defined(__APPLE__) && (defined(__linux__) || defined(BSD))
2015-04-18 21:54:41 +00:00
#endif // CGLXCONTEXT_HPP