mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 22:35:14 +02:00
Merge branch 'ambient' of https://github.com/samcake/hifi into ambient
This commit is contained in:
commit
a310a9c66c
1 changed files with 7 additions and 2 deletions
|
@ -79,9 +79,14 @@ GL41Texture::GL41Texture(const std::weak_ptr<GLBackend>& backend, const Texture&
|
||||||
uint8_t face = 0;
|
uint8_t face = 0;
|
||||||
for (GLenum target : getFaceTargets(_target)) {
|
for (GLenum target : getFaceTargets(_target)) {
|
||||||
const Byte* mipData = nullptr;
|
const Byte* mipData = nullptr;
|
||||||
|
gpu::Texture::PixelsPointer mip;
|
||||||
if (_gpuObject.isStoredMipFaceAvailable(mipLevel, face)) {
|
if (_gpuObject.isStoredMipFaceAvailable(mipLevel, face)) {
|
||||||
auto mip = _gpuObject.accessStoredMipFace(mipLevel, face);
|
mip = _gpuObject.accessStoredMipFace(mipLevel, face);
|
||||||
mipData = mip->readData();
|
if (mip) {
|
||||||
|
mipData = mip->readData();
|
||||||
|
} else {
|
||||||
|
mipData = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
glTexImage2D(target, mipLevel, texelFormat.internalFormat, dimensions.x, dimensions.y, 0, texelFormat.format, texelFormat.type, mipData);
|
glTexImage2D(target, mipLevel, texelFormat.internalFormat, dimensions.x, dimensions.y, 0, texelFormat.format, texelFormat.type, mipData);
|
||||||
(void)CHECK_GL_ERROR();
|
(void)CHECK_GL_ERROR();
|
||||||
|
|
Loading…
Reference in a new issue