mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:01:09 +02:00
Merge pull request #9264 from ChristophHaag/master
fix GL 4.5 when glTextureSubImage2DEXT unavailable
This commit is contained in:
commit
648de9da8d
1 changed files with 7 additions and 3 deletions
|
@ -398,9 +398,13 @@ bool GL45Texture::continueTransfer() {
|
||||||
glTextureSubImage2D(_id, mipLevel, 0, 0, size.x, size.y, texelFormat.format, texelFormat.type, mip->readData());
|
glTextureSubImage2D(_id, mipLevel, 0, 0, size.x, size.y, texelFormat.format, texelFormat.type, mip->readData());
|
||||||
} else if (GL_TEXTURE_CUBE_MAP == _target) {
|
} else if (GL_TEXTURE_CUBE_MAP == _target) {
|
||||||
// DSA ARB does not work on AMD, so use EXT
|
// DSA ARB does not work on AMD, so use EXT
|
||||||
// glTextureSubImage3D(_id, mipLevel, 0, 0, face, size.x, size.y, 1, texelFormat.format, texelFormat.type, mip->readData());
|
// unless EXT is not available on the driver
|
||||||
auto target = CUBE_FACE_LAYOUT[face];
|
if (glTextureSubImage2DEXT) {
|
||||||
glTextureSubImage2DEXT(_id, target, mipLevel, 0, 0, size.x, size.y, texelFormat.format, texelFormat.type, mip->readData());
|
auto target = CUBE_FACE_LAYOUT[face];
|
||||||
|
glTextureSubImage2DEXT(_id, target, mipLevel, 0, 0, size.x, size.y, texelFormat.format, texelFormat.type, mip->readData());
|
||||||
|
} else {
|
||||||
|
glTextureSubImage3D(_id, mipLevel, 0, 0, face, size.x, size.y, 1, texelFormat.format, texelFormat.type, mip->readData());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Q_ASSERT(false);
|
Q_ASSERT(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue