|
|
@@ -142,6 +142,7 @@ Graphics::Graphics(Context* context_) :
|
|
|
deferredSupport_(false),
|
|
|
hardwareDepthSupport_(false),
|
|
|
dxtTextureSupport_(false),
|
|
|
+ etcTextureSupport_(false),
|
|
|
numPrimitives_(0),
|
|
|
numBatches_(0),
|
|
|
defaultTextureFilterMode_(FILTER_BILINEAR),
|
|
|
@@ -303,6 +304,7 @@ bool Graphics::SetMode(int width, int height, bool fullscreen, bool vsync, bool
|
|
|
dxtTextureSupport_ = CheckExtension("EXT_texture_compression_s3tc");
|
|
|
#else
|
|
|
dxtTextureSupport_ = CheckExtension("EXT_texture_compression_dxt1");
|
|
|
+ etcTextureSupport_ = CheckExtension("OES_compressed_ETC1_RGB8_texture");
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
@@ -1587,11 +1589,9 @@ unsigned Graphics::GetFormat(CompressedFormat format) const
|
|
|
{
|
|
|
switch (format)
|
|
|
{
|
|
|
- #if !defined(GL_ES_VERSION_2_0) || defined(ANDROID)
|
|
|
case CF_DXT1:
|
|
|
return dxtTextureSupport_ ? GL_COMPRESSED_RGBA_S3TC_DXT1_EXT : 0;
|
|
|
- #endif
|
|
|
-
|
|
|
+
|
|
|
#ifndef GL_ES_VERSION_2_0
|
|
|
case CF_DXT3:
|
|
|
return dxtTextureSupport_ ? GL_COMPRESSED_RGBA_S3TC_DXT3_EXT : 0;
|
|
|
@@ -1600,7 +1600,7 @@ unsigned Graphics::GetFormat(CompressedFormat format) const
|
|
|
return dxtTextureSupport_ ? GL_COMPRESSED_RGBA_S3TC_DXT5_EXT : 0;
|
|
|
#else
|
|
|
case CF_ETC1:
|
|
|
- return GL_ETC1_RGB8_OES;
|
|
|
+ return etcTextureSupport_ ? GL_ETC1_RGB8_OES : 0;
|
|
|
#endif
|
|
|
}
|
|
|
|