mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-12 15:14:45 +02:00
Disable variable allocation textures on android
This commit is contained in:
parent
7579451c24
commit
8241def9b9
1 changed files with 9 additions and 7 deletions
|
@ -41,16 +41,19 @@ GLTexture* GLESBackend::syncGPUObject(const TexturePointer& texturePointer) {
|
||||||
object = new GLESAttachmentTexture(shared_from_this(), texture);
|
object = new GLESAttachmentTexture(shared_from_this(), texture);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TextureUsageType::STRICT_RESOURCE:
|
|
||||||
qCDebug(gpugllogging) << "Strict texture " << texture.source().c_str();
|
|
||||||
object = new GLESStrictResourceTexture(shared_from_this(), texture);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TextureUsageType::RESOURCE:
|
case TextureUsageType::RESOURCE:
|
||||||
|
// FIXME disabling variable allocation textures for now, while debugging android rendering
|
||||||
|
// and crashes
|
||||||
|
#if 0
|
||||||
qCDebug(gpugllogging) << "variable / Strict texture " << texture.source().c_str();
|
qCDebug(gpugllogging) << "variable / Strict texture " << texture.source().c_str();
|
||||||
object = new GLESResourceTexture(shared_from_this(), texture);
|
object = new GLESResourceTexture(shared_from_this(), texture);
|
||||||
GLVariableAllocationSupport::addMemoryManagedTexture(texturePointer);
|
GLVariableAllocationSupport::addMemoryManagedTexture(texturePointer);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
case TextureUsageType::STRICT_RESOURCE:
|
||||||
|
qCDebug(gpugllogging) << "Strict texture " << texture.source().c_str();
|
||||||
|
object = new GLESStrictResourceTexture(shared_from_this(), texture);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
|
@ -196,13 +199,12 @@ void GLESTexture::syncSampler() const {
|
||||||
glTexParameteri(_target, GL_TEXTURE_WRAP_R, WRAP_MODES[sampler.getWrapModeW()]);
|
glTexParameteri(_target, GL_TEXTURE_WRAP_R, WRAP_MODES[sampler.getWrapModeW()]);
|
||||||
|
|
||||||
glTexParameterfv(_target, GL_TEXTURE_BORDER_COLOR_EXT, (const float*)&sampler.getBorderColor());
|
glTexParameterfv(_target, GL_TEXTURE_BORDER_COLOR_EXT, (const float*)&sampler.getBorderColor());
|
||||||
glTexParameteri(_target, GL_TEXTURE_BASE_LEVEL, (uint16)sampler.getMipOffset());
|
//glTexParameterf(_target, GL_TEXTURE_MAX_ANISOTROPY_EXT, sampler.getMaxAnisotropy());
|
||||||
|
|
||||||
glTexParameterf(_target, GL_TEXTURE_MIN_LOD, (float)sampler.getMinMip());
|
glTexParameterf(_target, GL_TEXTURE_MIN_LOD, (float)sampler.getMinMip());
|
||||||
glTexParameterf(_target, GL_TEXTURE_MAX_LOD, (sampler.getMaxMip() == Sampler::MAX_MIP_LEVEL ? 1000.f : sampler.getMaxMip()));
|
glTexParameterf(_target, GL_TEXTURE_MAX_LOD, (sampler.getMaxMip() == Sampler::MAX_MIP_LEVEL ? 1000.f : sampler.getMaxMip()));
|
||||||
|
|
||||||
(void)CHECK_GL_ERROR();
|
(void)CHECK_GL_ERROR();
|
||||||
//glTexParameterf(_target, GL_TEXTURE_MAX_ANISOTROPY_EXT, sampler.getMaxAnisotropy());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using GLESFixedAllocationTexture = GLESBackend::GLESFixedAllocationTexture;
|
using GLESFixedAllocationTexture = GLESBackend::GLESFixedAllocationTexture;
|
||||||
|
|
Loading…
Reference in a new issue