mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 23:55:24 +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;
|
||||
for (GLenum target : getFaceTargets(_target)) {
|
||||
const Byte* mipData = nullptr;
|
||||
gpu::Texture::PixelsPointer mip;
|
||||
if (_gpuObject.isStoredMipFaceAvailable(mipLevel, face)) {
|
||||
auto mip = _gpuObject.accessStoredMipFace(mipLevel, face);
|
||||
mipData = mip->readData();
|
||||
mip = _gpuObject.accessStoredMipFace(mipLevel, face);
|
||||
if (mip) {
|
||||
mipData = mip->readData();
|
||||
} else {
|
||||
mipData = nullptr;
|
||||
}
|
||||
}
|
||||
glTexImage2D(target, mipLevel, texelFormat.internalFormat, dimensions.x, dimensions.y, 0, texelFormat.format, texelFormat.type, mipData);
|
||||
(void)CHECK_GL_ERROR();
|
||||
|
|
Loading…
Reference in a new issue