summaryrefslogtreecommitdiffstats
path: root/unityplugin/GhostCubePlugin/PluginSource
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-02-12 06:07:27 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-02-12 06:07:27 +0000
commit4effe027896a64d1db24c46aff96bb5e09b67c8d (patch)
tree1d6621c96fd94799d6e1ccf9b8c19f5f5a233e4d /unityplugin/GhostCubePlugin/PluginSource
parentRemoved unused Apple source from Unity emulator (diff)
downloadDiligentEngine-4effe027896a64d1db24c46aff96bb5e09b67c8d.tar.gz
DiligentEngine-4effe027896a64d1db24c46aff96bb5e09b67c8d.zip
Enabled iOS build; unified target platform app generation in cmake
Diffstat (limited to 'unityplugin/GhostCubePlugin/PluginSource')
-rw-r--r--unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp
index b5e1a0c..4e9b345 100644
--- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp
+++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderAPI_OpenGLCoreES.cpp
@@ -77,6 +77,12 @@ void RenderAPI_OpenGLCoreES::CreateRenderTargetAndDepthBuffer()
RenderTargetDesc.Usage = USAGE_DEFAULT;
RenderTargetDesc.Name = "Unity render target";
RenderTargetDesc.MipLevels = 1;
+#if PLATFORM_IOS
+ // Texture parameter queries are not supported in GLES3.0
+ RenderTargetDesc.Width = 1024;
+ RenderTargetDesc.Height = 1024;
+ RenderTargetDesc.Format = TEX_FORMAT_RGBA8_UNORM_SRGB;
+#endif
pDeviceGL->CreateTextureFromGLHandle(m_GLRenderTargetHandle, RenderTargetDesc, &pRenderTarget);
RefCntAutoPtr<ITexture> pDepthBuffer;
@@ -86,6 +92,12 @@ void RenderAPI_OpenGLCoreES::CreateRenderTargetAndDepthBuffer()
DepthBufferDesc.Usage = USAGE_DEFAULT;
DepthBufferDesc.Name = "Unity depth buffer";
DepthBufferDesc.MipLevels = 1;
+#if PLATFORM_IOS
+ // Texture parameter queries are not supported in GLES3.0
+ DepthBufferDesc.Width = 1024;
+ DepthBufferDesc.Height = 1024;
+ DepthBufferDesc.Format = TEX_FORMAT_D32_FLOAT;
+#endif
pDeviceGL->CreateTextureFromGLHandle(m_GLDepthTextureHandle, DepthBufferDesc, &pDepthBuffer);
CreateTextureViews(pRenderTarget, pDepthBuffer);