mirror of https://github.com/AxioDL/boo.git
* Platform guards
This commit is contained in:
parent
34599a0c15
commit
460d3875f5
|
@ -6,10 +6,10 @@
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#error "No support for WGL"
|
#error "No support for WGL"
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
#include "CCGLContext.hpp"
|
#include "mac/CCGLContext.hpp"
|
||||||
typedef CCGLContext CGraphicsContext;
|
typedef CCGLContext CGraphicsContext;
|
||||||
#elif __linux__
|
#elif defined(__GNUC__) || defined(__clang__)
|
||||||
#include "CGLXContext.hpp"
|
#include "x11/CGLXContext.hpp"
|
||||||
typedef CGLXContext CGraphicsContext;
|
typedef CGLXContext CGraphicsContext;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef CCGLCONTEXT_HPP
|
#ifndef CCGLCONTEXT_HPP
|
||||||
#define CCGLCONTEXT_HPP
|
#define CCGLCONTEXT_HPP
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
#include "IGraphicsContext.hpp"
|
#include "IGraphicsContext.hpp"
|
||||||
#include <OpenGL/OpenGL.h>
|
#include <OpenGL/OpenGL.h>
|
||||||
|
|
||||||
|
@ -24,4 +25,5 @@ private:
|
||||||
int m_majVersion;
|
int m_majVersion;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // __APPLE__
|
||||||
#endif // CCGLCONTEXT_HPP
|
#endif // CCGLCONTEXT_HPP
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#ifndef CWGLCONTEXT_HPP
|
||||||
|
#define CWGLCONTEXT_HPP
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
|
||||||
|
#endif // _WIN32
|
||||||
|
#endif // CWGLCONTEXT_HPP
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef CGLXCONTEXT_HPP
|
#ifndef CGLXCONTEXT_HPP
|
||||||
#define CGLXCONTEXT_HPP
|
#define CGLXCONTEXT_HPP
|
||||||
|
|
||||||
|
#if !defined(__APPLE__) && (defined(__linux__) || defined(BSD))
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
|
|
||||||
#include <IGraphicsContext.hpp>
|
#include <IGraphicsContext.hpp>
|
||||||
|
@ -28,5 +29,5 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // !defined(__APPLE__) && (defined(__linux__) || defined(BSD))
|
||||||
#endif // CGLXCONTEXT_HPP
|
#endif // CGLXCONTEXT_HPP
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#ifdef __APPLE__
|
||||||
#include "CCGLContext.hpp"
|
#include "CCGLContext.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "win/CWGLContext.hpp"
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,4 +1,5 @@
|
||||||
#include "CGLXContext.hpp"
|
#if !defined(__APPLE__) && (defined(__linux__) || defined(BSD))
|
||||||
|
#include "x11/CGLXContext.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
CGLXContext::CGLXContext()
|
CGLXContext::CGLXContext()
|
||||||
|
@ -53,3 +54,5 @@ int CGLXContext::blueDepth() const
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // !defined(__APPLE__) && (defined(__linux__) || defined(BSD))
|
||||||
|
|
Loading…
Reference in New Issue