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)
|
||||
#error "No support for WGL"
|
||||
#elif defined(__APPLE__)
|
||||
#include "CCGLContext.hpp"
|
||||
#include "mac/CCGLContext.hpp"
|
||||
typedef CCGLContext CGraphicsContext;
|
||||
#elif __linux__
|
||||
#include "CGLXContext.hpp"
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
#include "x11/CGLXContext.hpp"
|
||||
typedef CGLXContext CGraphicsContext;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef CCGLCONTEXT_HPP
|
||||
#define CCGLCONTEXT_HPP
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include "IGraphicsContext.hpp"
|
||||
#include <OpenGL/OpenGL.h>
|
||||
|
||||
|
@ -24,4 +25,5 @@ private:
|
|||
int m_majVersion;
|
||||
};
|
||||
|
||||
#endif // __APPLE__
|
||||
#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
|
||||
#define CGLXCONTEXT_HPP
|
||||
|
||||
#if !defined(__APPLE__) && (defined(__linux__) || defined(BSD))
|
||||
#include <GL/glx.h>
|
||||
|
||||
#include <IGraphicsContext.hpp>
|
||||
|
@ -28,5 +29,5 @@ private:
|
|||
};
|
||||
|
||||
|
||||
|
||||
#endif // !defined(__APPLE__) && (defined(__linux__) || defined(BSD))
|
||||
#endif // CGLXCONTEXT_HPP
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#ifdef __APPLE__
|
||||
#include "CCGLContext.hpp"
|
||||
#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>
|
||||
|
||||
CGLXContext::CGLXContext()
|
||||
|
@ -53,3 +54,5 @@ int CGLXContext::blueDepth() const
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif // !defined(__APPLE__) && (defined(__linux__) || defined(BSD))
|
||||
|
|
Loading…
Reference in New Issue