mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 12:33:37 +02:00
Merge pull request #8438 from zzmp/fix/amd-cubemap
fix cubemaps on AMD cards running GL 4.5
This commit is contained in:
commit
8fdecc6e56
1 changed files with 4 additions and 1 deletions
|
@ -84,7 +84,10 @@ void GL45Backend::GL45Texture::transferMip(uint16_t mipLevel, uint8_t face) cons
|
|||
if (GL_TEXTURE_2D == _target) {
|
||||
glTextureSubImage2D(_id, mipLevel, 0, 0, size.x, size.y, texelFormat.format, texelFormat.type, mip->readData());
|
||||
} else if (GL_TEXTURE_CUBE_MAP == _target) {
|
||||
glTextureSubImage3D(_id, mipLevel, 0, 0, face, size.x, size.y, 1, texelFormat.format, texelFormat.type, mip->readData());
|
||||
// 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());
|
||||
auto target = CUBE_FACE_LAYOUT[face];
|
||||
glTextureSubImage2DEXT(_id, target, mipLevel, 0, 0, size.x, size.y, texelFormat.format, texelFormat.type, mip->readData());
|
||||
} else {
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue