mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-13 21:27:21 +02:00
Only enable sparse textures by env variable
This commit is contained in:
parent
93b0364f73
commit
a55669b83e
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ using namespace gpu::gl;
|
|||
using namespace gpu::gl45;
|
||||
|
||||
static const QString DEBUG_FLAG("HIFI_ENABLE_SPARSE_TEXTURES");
|
||||
static bool enableSparseTextures = true; // QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG);
|
||||
static bool enableSparseTextures = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG);
|
||||
|
||||
// Allocate 1 MB of buffer space for paged transfers
|
||||
#define DEFAULT_PAGE_BUFFER_SIZE (1024*1024)
|
||||
|
@ -179,7 +179,7 @@ GLuint GL45Backend::getTextureID(const TexturePointer& texture, bool transfer) {
|
|||
GL45Texture::GL45Texture(const std::weak_ptr<GLBackend>& backend, const Texture& texture, bool transferrable)
|
||||
: GLTexture(backend, texture, allocate(texture), transferrable), _sparseInfo(*this), _transferState(*this) {
|
||||
|
||||
_sparse = _transferrable && (_target != GL_TEXTURE_CUBE_MAP);
|
||||
_sparse = enableSparseTextures && _transferrable && (_target != GL_TEXTURE_CUBE_MAP);
|
||||
|
||||
if (_sparse) {
|
||||
glTextureParameteri(_id, GL_TEXTURE_SPARSE_ARB, GL_TRUE);
|
||||
|
|
Loading…
Reference in a new issue