diff --git a/include/CCGLContext.hpp b/include/CCGLContext.hpp index 8834835..7690e1e 100644 --- a/include/CCGLContext.hpp +++ b/include/CCGLContext.hpp @@ -8,8 +8,11 @@ class CCGLContext final : public IContext { public: CCGLContext(); - virtual ~CCGLContext() {} + virtual ~CCGLContext(); + bool create(); + void setMinVersion (const int& min) override; + void setMajorVersion(const int& maj) override; const std::string version() const override; const std::string name() const override; int depthSize() const override; diff --git a/libBoo.pri b/libBoo.pri index 709d7f5..97e9074 100644 --- a/libBoo.pri +++ b/libBoo.pri @@ -6,26 +6,27 @@ HEADERS += \ $$PWD/include/ISurface.hpp \ $$PWD/include/IRetraceWaiter.hpp -unix:HEADERS += \ - $$PWD/include/CGLXContext.hpp \ - -mac:HEADERS -= \ +unix:!macx:HEADERS += \ $$PWD/include/CGLXContext.hpp + mac:HEADERS += \ $$PWD/include/CCGLContext.hpp win32:HEADERS += \ - $$PWD/include/CWGLContext.hpp \ + $$PWD/include/CWGLContext.hpp -unix:SOURCES += \ - $$PWD/src/CGLXContext.cpp \ +SOURCES += \ + $$PWD/src/CSurface.cpp \ + $$PWD/src/CCGLContext.cpp \ + $$PWD/src/CRetraceWaiter.cpp -mac:SOURCES -= \ +unix:!macx:SOURCES += \ $$PWD/src/CGLXContext.cpp + mac:OBJECTIVE_SOURCES += \ $$PWD/src/CCGLCocoaView.mm win32:SOURCES += \ - $$PWD/src/CWGLContext.cpp \ + $$PWD/src/CWGLContext.cpp INCLUDEPATH += $$PWD/include diff --git a/libBoo.pro b/libBoo.pro index 394141e..3c9e72e 100644 --- a/libBoo.pro +++ b/libBoo.pro @@ -1,8 +1,8 @@ CONFIG -= Qt CONFIG += app c++11 -unix:CONFIG += link_pkgconfig -unix:PKGCONFIG += x11 +unix:!macx:CONFIG += link_pkgconfig +unix:!macx:PKGCONFIG += x11 include(libBoo.pri) include(test/test.pri) diff --git a/src/CCGLContext.cpp b/src/CCGLContext.cpp index 3a47616..04938e3 100644 --- a/src/CCGLContext.cpp +++ b/src/CCGLContext.cpp @@ -2,10 +2,32 @@ #include CCGLContext::CCGLContext() + : m_majVersion(3), + m_minVersion(3) { std::cout << "Hello from CGL" << std::endl; } +CCGLContext::~CCGLContext() +{ + +} + +bool CCGLContext::create() +{ + return true; +} + +void CCGLContext::setMinVersion(const int& min) +{ + m_minVersion = min; +} + +void CCGLContext::setMajorVersion(const int& maj) +{ + m_majVersion = maj; +} + const std::string CCGLContext::version() const { return "Invalid version";