diff --git a/CMakeLists.txt b/CMakeLists.txt index e3f9111..c095678 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,7 +82,9 @@ elseif(APPLE) find_library(APPKIT_LIBRARY AppKit) find_library(IOKIT_LIBRARY IOKit) find_library(OPENGL_LIBRARY OpenGL) + unset(BOO_HAS_METAL CACHE) if (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.10) + set(BOO_HAS_METAL ON CACHE BOOL "Metal is available in this OS X version" FORCE) find_library(METAL_LIBRARY Metal) list(APPEND _BOO_SYS_DEFINES -DBOO_HAS_METAL=1) else() diff --git a/include/boo/graphicsdev/GL.hpp b/include/boo/graphicsdev/GL.hpp index a0da8d4..33d7656 100644 --- a/include/boo/graphicsdev/GL.hpp +++ b/include/boo/graphicsdev/GL.hpp @@ -26,8 +26,8 @@ public: GLDataFactory(IGraphicsContext* parent, uint32_t drawSamples); ~GLDataFactory() {destroyAllData();} - Platform platform() const {return Platform::OGL;} - const SystemChar* platformName() const {return _S("OGL");} + Platform platform() const {return Platform::OpenGL;} + const SystemChar* platformName() const {return _S("OpenGL");} class Context : public IGraphicsDataFactory::Context { @@ -35,8 +35,8 @@ public: GLDataFactory& m_parent; Context(GLDataFactory& parent) : m_parent(parent) {} public: - Platform platform() const {return Platform::OGL;} - const SystemChar* platformName() const {return _S("OGL");} + Platform platform() const {return Platform::OpenGL;} + const SystemChar* platformName() const {return _S("OpenGL");} IGraphicsBufferS* newStaticBuffer(BufferUse use, const void* data, size_t stride, size_t count); IGraphicsBufferD* newDynamicBuffer(BufferUse use, size_t stride, size_t count); diff --git a/include/boo/graphicsdev/IGraphicsDataFactory.hpp b/include/boo/graphicsdev/IGraphicsDataFactory.hpp index 33ec7b1..a189b14 100644 --- a/include/boo/graphicsdev/IGraphicsDataFactory.hpp +++ b/include/boo/graphicsdev/IGraphicsDataFactory.hpp @@ -191,7 +191,7 @@ struct IGraphicsDataFactory enum class Platform { Null, - OGL, + OpenGL, D3D11, D3D12, Metal, diff --git a/lib/graphicsdev/GL.cpp b/lib/graphicsdev/GL.cpp index 686fb38..54e906e 100644 --- a/lib/graphicsdev/GL.cpp +++ b/lib/graphicsdev/GL.cpp @@ -753,8 +753,8 @@ static const GLenum SEMANTIC_TYPE_TABLE[] = struct GLCommandQueue : IGraphicsCommandQueue { - Platform platform() const {return IGraphicsDataFactory::Platform::OGL;} - const SystemChar* platformName() const {return _S("OGL");} + Platform platform() const {return IGraphicsDataFactory::Platform::OpenGL;} + const SystemChar* platformName() const {return _S("OpenGL");} IGraphicsContext* m_parent = nullptr; struct Command diff --git a/test/main.cpp b/test/main.cpp index 7d17965..86a9f27 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -277,7 +277,7 @@ struct TestApplicationCallback : IApplicationCallback /* Make shader pipeline */ IShaderPipeline* pipeline = nullptr; auto plat = ctx.platform(); - if (plat == IGraphicsDataFactory::Platform::OGL) + if (plat == IGraphicsDataFactory::Platform::OpenGL) { GLDataFactory::Context& glF = dynamic_cast(ctx);