summaryrefslogtreecommitdiffstats
path: root/unityplugin/GhostCubePlugin/PluginSource
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-01-27 05:19:49 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-01-27 05:19:49 +0000
commit1a528cdfc47aa142295876a780696cdf24bd09eb (patch)
treed8d645101a530792faf9e338ac3ec8c04a4d07d7 /unityplugin/GhostCubePlugin/PluginSource
parentUpdate README.md (diff)
downloadDiligentEngine-1a528cdfc47aa142295876a780696cdf24bd09eb.tar.gz
DiligentEngine-1a528cdfc47aa142295876a780696cdf24bd09eb.zip
Enabled MacOS support
Diffstat (limited to 'unityplugin/GhostCubePlugin/PluginSource')
-rw-r--r--unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt2
-rw-r--r--unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp2
2 files changed, 4 insertions, 0 deletions
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<ITexture> 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);