From a39ba04e26d40c049639238e254416cc9ffcbdd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 19 Jun 2015 19:55:23 -0700 Subject: [PATCH] Fixed Linux build. --- scripts/bgfx.lua | 8 ++++++-- src/bgfx.cpp | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/bgfx.lua b/scripts/bgfx.lua index 39fed34d..0078b695 100644 --- a/scripts/bgfx.lua +++ b/scripts/bgfx.lua @@ -144,6 +144,9 @@ function bgfxProject(_name, _kind, _defines) path.join(BGFX_DIR, "src/renderer_mtl.mm"), path.join(BGFX_DIR, "src/amalgamated.cpp"), } + + configuration {} + else configuration { "xcode4 or osx or ios*" } files { @@ -152,9 +155,10 @@ function bgfxProject(_name, _kind, _defines) path.join(BGFX_DIR, "src/renderer_mtl.mm"), } + configuration {} + excludes { - path.join(BGFX_DIR, "src/amalgamated.mm"), - path.join(BGFX_DIR, "src/amalgamated.cpp"), + path.join(BGFX_DIR, "src/amalgamated.**"), } end diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 1d53bd98..c48f540c 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -1358,7 +1358,11 @@ namespace bgfx { d3d9::rendererCreate, d3d9::rendererDestroy, BGFX_RENDERER_DIRECT3D9_NAME, !!BGFX_CONFIG_RENDERER_DIRECT3D9 }, // Direct3D9 { d3d11::rendererCreate, d3d11::rendererDestroy, BGFX_RENDERER_DIRECT3D11_NAME, !!BGFX_CONFIG_RENDERER_DIRECT3D11 }, // Direct3D11 { d3d12::rendererCreate, d3d12::rendererDestroy, BGFX_RENDERER_DIRECT3D12_NAME, !!BGFX_CONFIG_RENDERER_DIRECT3D12 }, // Direct3D12 +#if BX_PLATFORM_OSX || BX_PLATFORM_IOS { mtl::rendererCreate, mtl::rendererDestroy, BGFX_RENDERER_METAL_NAME, !!BGFX_CONFIG_RENDERER_METAL }, // Metal +#else + { noop::rendererCreate, noop::rendererDestroy, BGFX_RENDERER_NULL_NAME, !!BGFX_CONFIG_RENDERER_NULL }, // Noop +#endif // BX_PLATFORM_OSX || BX_PLATFORM_IOS { gl::rendererCreate, gl::rendererDestroy, BGFX_RENDERER_OPENGL_NAME, !!BGFX_CONFIG_RENDERER_OPENGLES }, // OpenGLES { gl::rendererCreate, gl::rendererDestroy, BGFX_RENDERER_OPENGL_NAME, !!BGFX_CONFIG_RENDERER_OPENGL }, // OpenGL { vk::rendererCreate, vk::rendererDestroy, BGFX_RENDERER_VULKAN_NAME, !!BGFX_CONFIG_RENDERER_VULKAN }, // Vulkan