OS X fixes

This commit is contained in:
Jack Andersen
2015-11-16 12:03:46 -10:00
parent 181a038901
commit 0be417f0b0
5 changed files with 41 additions and 9 deletions

View File

@@ -2,8 +2,7 @@
#define BOO_COCOACOMMON_HPP
#if __APPLE__
#include <Metal/Metal.h>
#include <QuartzCore/CAMetalLayer.h>
#include <Availability.h>
template <class T>
class NSPtr
@@ -23,6 +22,12 @@ public:
void reset() {[m_ptr release]; m_ptr = 0;}
};
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
#define BOO_HAS_METAL 1
#include <Metal/Metal.h>
#include <QuartzCore/CAMetalLayer.h>
namespace boo
{
struct MetalContext
@@ -37,5 +42,13 @@ struct MetalContext
};
}
#else
#define BOO_HAS_METAL 0
namespace boo
{
struct MetalContext {};
}
#endif
#endif // __APPLE__
#endif // BOO_COCOACOMMON_HPP