Forráskód Böngészése

Fixed Android build.

Lasse Öörni 13 éve
szülő
commit
c800e15ab7

+ 9 - 5
Engine/Graphics/OpenGL/OGLGraphics.cpp

@@ -1995,7 +1995,11 @@ unsigned Graphics::GetRGBAFormat()
 
 
 unsigned Graphics::GetRGBA16Format()
 unsigned Graphics::GetRGBA16Format()
 {
 {
+    #ifndef GL_ES_VERSION_2_0
     return GL_RGBA16;
     return GL_RGBA16;
+    #else
+    return GL_RGBA;
+    #endif
 }
 }
 
 
 unsigned Graphics::GetRGBAFloat16Format()
 unsigned Graphics::GetRGBAFloat16Format()
@@ -2003,7 +2007,7 @@ unsigned Graphics::GetRGBAFloat16Format()
     #ifndef GL_ES_VERSION_2_0
     #ifndef GL_ES_VERSION_2_0
     return GL_RGBA16F_ARB;
     return GL_RGBA16F_ARB;
     #else
     #else
-    return GL_RGBA16;
+    return GL_RGBA;
     #endif
     #endif
 }
 }
 
 
@@ -2012,7 +2016,7 @@ unsigned Graphics::GetRGBAFloat32Format()
     #ifndef GL_ES_VERSION_2_0
     #ifndef GL_ES_VERSION_2_0
     return GL_RGBA32F_ARB;
     return GL_RGBA32F_ARB;
     #else
     #else
-    return GL_RGBA16;
+    return GL_RGBA;
     #endif
     #endif
 }
 }
 
 
@@ -2021,7 +2025,7 @@ unsigned Graphics::GetRG16Format()
     #ifndef GL_ES_VERSION_2_0
     #ifndef GL_ES_VERSION_2_0
     return GL_RG16;
     return GL_RG16;
     #else
     #else
-    return 0;
+    return GL_RGBA;
     #endif
     #endif
 }
 }
 
 
@@ -2030,7 +2034,7 @@ unsigned Graphics::GetRGFloat16Format()
     #ifndef GL_ES_VERSION_2_0
     #ifndef GL_ES_VERSION_2_0
     return GL_RG16F;
     return GL_RG16F;
     #else
     #else
-    return 0;
+    return GL_RGBA;
     #endif
     #endif
 }
 }
 
 
@@ -2039,7 +2043,7 @@ unsigned Graphics::GetRGFloat32Format()
     #ifndef GL_ES_VERSION_2_0
     #ifndef GL_ES_VERSION_2_0
     return GL_RG32F;
     return GL_RG32F;
     #else
     #else
-    return 0;
+    return GL_RGBA;
     #endif
     #endif
 }
 }
 
 

+ 3 - 6
Engine/Graphics/OpenGL/OGLTexture.cpp

@@ -268,10 +268,10 @@ unsigned Texture::GetRowDataSize(int width) const
     #endif
     #endif
         return width * 4;
         return width * 4;
         
         
+    #ifndef GL_ES_VERSION_2_0
     case GL_RGBA16:
     case GL_RGBA16:
         return width * 8;
         return width * 8;
         
         
-    #ifndef GL_ES_VERSION_2_0
     case GL_RGBA16F_ARB:
     case GL_RGBA16F_ARB:
     case GL_RGBA32F_ARB:
     case GL_RGBA32F_ARB:
         return width * 16;
         return width * 16;
@@ -319,10 +319,7 @@ unsigned Texture::GetExternalFormat(unsigned format)
     else
     else
         return format;
         return format;
     #else
     #else
-    if (format == GL_RGBA16)
-        return GL_RGBA;
-    else
-        return format;
+    return format;
     #endif
     #endif
 }
 }
 
 
@@ -341,7 +338,7 @@ unsigned Texture::GetDataType(unsigned format)
     #else
     #else
     if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_COMPONENT24_OES)
     if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_COMPONENT24_OES)
         return GL_UNSIGNED_INT;
         return GL_UNSIGNED_INT;
-    else if (format == GL_DEPTH_COMPONENT16 || format == GL_RGBA16)
+    else if (format == GL_DEPTH_COMPONENT16)
         return GL_UNSIGNED_SHORT;
         return GL_UNSIGNED_SHORT;
     else
     else
         return GL_UNSIGNED_BYTE;
         return GL_UNSIGNED_BYTE;