mirror of
https://github.com/AxioDL/boo.git
synced 2025-07-01 02:43:34 +00:00
Merge pull request #2 from RetroView/cgl-context
initial CGL stubs; directory layout
This commit is contained in:
commit
4365475373
12
include/CCGLContext.hpp
Normal file
12
include/CCGLContext.hpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef CCGLCONTEXT_HPP
|
||||||
|
#define CCGLCONTEXT_HPP
|
||||||
|
|
||||||
|
#include "IContext.hpp"
|
||||||
|
#include <OpenGL/OpenGL.h>
|
||||||
|
|
||||||
|
class CCGLContext final : public IContext
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CCGLCONTEXT_HPP
|
@ -7,7 +7,7 @@ class IContext
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~IContext() {}
|
virtual ~IContext() {}
|
||||||
|
|
||||||
virtual void setMinVersion (const int& min)=0;
|
virtual void setMinVersion (const int& min)=0;
|
||||||
virtual void setMajorVersion(const int& maj)=0;
|
virtual void setMajorVersion(const int& maj)=0;
|
||||||
virtual void create();
|
virtual void create();
|
||||||
@ -19,4 +19,4 @@ public:
|
|||||||
virtual int blueDepth() const=0;
|
virtual int blueDepth() const=0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ICONTEXT_HPP
|
#endif // ICONTEXT_HPP
|
9
include/ISurface.hpp
Normal file
9
include/ISurface.hpp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#ifndef ISURFACE_HPP
|
||||||
|
#define ISURFACE_HPP
|
||||||
|
|
||||||
|
class ISurface
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CSURFACE_HPP
|
16
include/boo.hpp
Normal file
16
include/boo.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef BOO_HPP
|
||||||
|
#define BOO_HPP
|
||||||
|
|
||||||
|
#include "IContext.hpp"
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#error "No support for WGL"
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
#include "CCGLContext.hpp"
|
||||||
|
typedef CCGLContext CContext;
|
||||||
|
#elif __linux__
|
||||||
|
#include "CGLXContext.hpp"
|
||||||
|
typedef CGLXContext CContext;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOO_HPP
|
10
libBoo.pri
Normal file
10
libBoo.pri
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
HEADERS += \
|
||||||
|
$$PWD/include/boo.hpp \
|
||||||
|
$$PWD/include/IContext.hpp \
|
||||||
|
$$PWD/include/CCGLContext.hpp \
|
||||||
|
$$PWD/include/ISurface.hpp
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
$$PWD/src/CCGLContext.cpp
|
||||||
|
|
||||||
|
INCLUDEPATH += $$PWD/include
|
@ -1,9 +1,5 @@
|
|||||||
CONFIG -= Qt
|
CONFIG -= Qt
|
||||||
CONFIG += app c++11
|
CONFIG += app c++11
|
||||||
|
|
||||||
HEADERS += \
|
include(libBoo.pri)
|
||||||
include/IContext.hpp \
|
include(test/test.pri)
|
||||||
include/CGLXContext.hpp
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
src/CGLXContext.cpp
|
|
||||||
|
0
src/CCGLContext.cpp
Normal file
0
src/CCGLContext.cpp
Normal file
8
test/main.cpp
Normal file
8
test/main.cpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <boo.hpp>
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
2
test/test.pri
Normal file
2
test/test.pri
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SOURCES += \
|
||||||
|
$$PWD/main.cpp
|
Loading…
x
Reference in New Issue
Block a user