mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:49:05 +02:00
Support using prefering mobile compressed textures on desktop
This commit is contained in:
parent
ab9a4a55f8
commit
2f92e10142
1 changed files with 7 additions and 2 deletions
|
@ -24,6 +24,10 @@
|
||||||
#include <gpu/TextureTable.h>
|
#include <gpu/TextureTable.h>
|
||||||
#include <gpu/gl/GLTexelFormat.h>
|
#include <gpu/gl/GLTexelFormat.h>
|
||||||
|
|
||||||
|
static const QString FORCE_MOBILE_TEXTURES_STRING{ "HIFI_FORCE_MOBILE_TEXTURES" };
|
||||||
|
static bool FORCE_MOBILE_TEXTURES = QProcessEnvironment::systemEnvironment().contains(FORCE_MOBILE_TEXTURES_STRING);
|
||||||
|
|
||||||
|
|
||||||
using namespace gpu;
|
using namespace gpu;
|
||||||
using namespace gpu::gl;
|
using namespace gpu::gl;
|
||||||
using namespace gpu::gl45;
|
using namespace gpu::gl45;
|
||||||
|
@ -45,9 +49,10 @@ bool GL45Backend::supportedTextureFormat(const gpu::Element& format) {
|
||||||
case gpu::Semantic::COMPRESSED_EAC_RED_SIGNED:
|
case gpu::Semantic::COMPRESSED_EAC_RED_SIGNED:
|
||||||
case gpu::Semantic::COMPRESSED_EAC_XY:
|
case gpu::Semantic::COMPRESSED_EAC_XY:
|
||||||
case gpu::Semantic::COMPRESSED_EAC_XY_SIGNED:
|
case gpu::Semantic::COMPRESSED_EAC_XY_SIGNED:
|
||||||
return false;
|
return FORCE_MOBILE_TEXTURES;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return true;
|
return FORCE_MOBILE_TEXTURES ? !format.isCompressed() : true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue