2
0
Эх сурвалжийг харах

Disable rendertarget mipmaps on iOS as they appear not to work.

Lasse Öörni 9 жил өмнө
parent
commit
1edc5f306e

+ 2 - 2
Source/Urho3D/Graphics/OpenGL/OGLTexture2D.cpp

@@ -460,8 +460,8 @@ bool Texture2D::Create()
         requestedLevels_ = 1;
         requestedLevels_ = 1;
     else if (usage_ == TEXTURE_RENDERTARGET)
     else if (usage_ == TEXTURE_RENDERTARGET)
     {
     {
-#ifdef __EMSCRIPTEN__
-        // glGenerateMipmap appears to not be working on WebGL, disable rendertarget mipmaps for now
+#if defined(__EMSCRIPTEN__) || defined(IOS)
+        // glGenerateMipmap appears to not be working on WebGL or iOS, disable rendertarget mipmaps for now
         requestedLevels_ = 1;
         requestedLevels_ = 1;
 #else
 #else
         if (requestedLevels_ != 1)
         if (requestedLevels_ != 1)

+ 2 - 2
Source/Urho3D/Graphics/OpenGL/OGLTextureCube.cpp

@@ -485,8 +485,8 @@ bool TextureCube::Create()
         requestedLevels_ = 1;
         requestedLevels_ = 1;
     else if (usage_ == TEXTURE_RENDERTARGET)
     else if (usage_ == TEXTURE_RENDERTARGET)
     {
     {
-#ifdef __EMSCRIPTEN__
-        // glGenerateMipmap appears to not be working on WebGL, disable rendertarget mipmaps for now
+#if defined(__EMSCRIPTEN__) || defined(IOS)
+        // glGenerateMipmap appears to not be working on WebGL or iOS, disable rendertarget mipmaps for now
         requestedLevels_ = 1;
         requestedLevels_ = 1;
 #else
 #else
         if (requestedLevels_ != 1)
         if (requestedLevels_ != 1)