From 1a528cdfc47aa142295876a780696cdf24bd09eb Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 26 Jan 2018 21:19:49 -0800 Subject: Enabled MacOS support --- unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt | 2 ++ unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'unityplugin/GhostCubePlugin/PluginSource') diff --git a/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt b/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt index 02a43ea..ffd9b99 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt +++ b/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt @@ -117,6 +117,8 @@ elseif(PLATFORM_ANDROID) set(UNITY_PLUGIN_PATH ${UNITY_PLUGIN_PATH}/Android/libGhostCubePlugin.so) elseif(PLATFORM_LINUX) set(UNITY_PLUGIN_PATH ${UNITY_PLUGIN_PATH}/libGhostCubePlugin.so) +elseif(PLATFORM_MACOS) + set(UNITY_PLUGIN_PATH ${UNITY_PLUGIN_PATH}/MacOS/libGhostCubePlugin.so) else() message(FATAL_ERROR "Unsupported platform") endif() diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp index 0b100d1..2a07cc2 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp @@ -76,6 +76,7 @@ void RenderAPI_OpenGLCoreES::CreateRenderTargetAndDepthBuffer() RenderTargetDesc.BindFlags = BIND_RENDER_TARGET; RenderTargetDesc.Usage = USAGE_DEFAULT; RenderTargetDesc.Name = "Unity render target"; + RenderTargetDesc.MipLevels = 1; pDeviceGL->CreateTextureFromGLHandle(m_GLRenderTargetHandle, RenderTargetDesc, &pRenderTarget); RefCntAutoPtr pDepthBuffer; @@ -84,6 +85,7 @@ void RenderAPI_OpenGLCoreES::CreateRenderTargetAndDepthBuffer() DepthBufferDesc.BindFlags = BIND_DEPTH_STENCIL; DepthBufferDesc.Usage = USAGE_DEFAULT; DepthBufferDesc.Name = "Unity depth buffer"; + DepthBufferDesc.MipLevels = 1; pDeviceGL->CreateTextureFromGLHandle(m_GLDepthTextureHandle, DepthBufferDesc, &pDepthBuffer); CreateTextureViews(pRenderTarget, pDepthBuffer); -- cgit v1.2.3