mirror of https://github.com/AxioDL/boo.git
Merge branch 'master' of https://github.com/RetroView/libBoo
Conflicts: include/IContext.hpp test/main.cpp
This commit is contained in:
commit
6e766bfe5e
|
@ -11,6 +11,9 @@ public:
|
|||
CGLXContext();
|
||||
virtual ~CGLXContext() {}
|
||||
|
||||
bool create();
|
||||
void setMajorVersion(const int& maj) override;
|
||||
void setMinVersion(const int& min) override;
|
||||
const std::string version() const override;
|
||||
const std::string name() const override;
|
||||
int depthSize() const override;
|
||||
|
@ -18,8 +21,10 @@ public:
|
|||
int greenDepth() const override;
|
||||
int blueDepth() const override;
|
||||
private:
|
||||
int m_minVersion;
|
||||
int m_majVersion;
|
||||
int m_minVersion;
|
||||
|
||||
Display* m_display;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
class IContext
|
||||
{
|
||||
public:
|
||||
virtual ~IContext() {}
|
||||
|
||||
virtual void setMinVersion (const int& min)=0;
|
||||
virtual void setMajorVersion(const int& maj)=0;
|
||||
virtual void create()=0;
|
||||
virtual bool create()=0;
|
||||
virtual const std::string version() const=0;
|
||||
virtual const std::string name() const=0;
|
||||
virtual int depthSize() const=0;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
!contains(CONFIG,c++11):CONFIG += C++11
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/include/boo.hpp \
|
||||
$$PWD/include/IContext.hpp \
|
||||
|
@ -15,12 +17,6 @@ mac:HEADERS += \
|
|||
win32:HEADERS += \
|
||||
$$PWD/include/CWGLContext.hpp \
|
||||
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/src/CSurface.cpp \
|
||||
$$PWD/src/CCGLContext.cpp \
|
||||
$$PWD/src/CRetraceWaiter.cpp
|
||||
|
||||
unix:SOURCES += \
|
||||
$$PWD/src/CGLXContext.cpp \
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
CONFIG -= Qt
|
||||
CONFIG += app c++11
|
||||
|
||||
unix:CONFIG += link_pkgconfig
|
||||
unix:PKGCONFIG += x11
|
||||
|
||||
include(libBoo.pri)
|
||||
include(test/test.pri)
|
||||
|
|
|
@ -2,10 +2,28 @@
|
|||
#include <iostream>
|
||||
|
||||
CGLXContext::CGLXContext()
|
||||
: m_majVersion(3),
|
||||
m_minVersion(3),
|
||||
m_display(nullptr)
|
||||
{
|
||||
std::cout << "Hello from GLX" << std::endl;
|
||||
}
|
||||
|
||||
bool CGLXContext::create()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void CGLXContext::setMinVersion(const int& min)
|
||||
{
|
||||
m_minVersion = min;
|
||||
}
|
||||
|
||||
void CGLXContext::setMajorVersion(const int& maj)
|
||||
{
|
||||
m_majVersion = maj;
|
||||
}
|
||||
|
||||
const std::string CGLXContext::version() const
|
||||
{
|
||||
return "Invalid version";
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
IContext* ctx = new CContext;
|
||||
|
||||
if (ctx->create())
|
||||
{
|
||||
}
|
||||
|
||||
delete ctx;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue