mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 08:37:19 +02:00
Merge pull request #7745 from jherico/mac_texture_fix
Fixing texture storage allocation on OSX/GL 4.1
This commit is contained in:
commit
f1f9c6740d
3 changed files with 5 additions and 1 deletions
|
@ -243,7 +243,7 @@ void GLBackend::GLTexture::allocateStorage() {
|
||||||
glTexStorage2D(_target, usedMipLevels(), texelFormat.internalFormat, dimensions.x, dimensions.y);
|
glTexStorage2D(_target, usedMipLevels(), texelFormat.internalFormat, dimensions.x, dimensions.y);
|
||||||
(void)CHECK_GL_ERROR();
|
(void)CHECK_GL_ERROR();
|
||||||
} else {
|
} else {
|
||||||
for (uint16_t l = _minMip; l < _maxMip; l++) {
|
for (uint16_t l = _minMip; l <= _maxMip; l++) {
|
||||||
// Get the mip level dimensions, accounting for the downgrade level
|
// Get the mip level dimensions, accounting for the downgrade level
|
||||||
Vec3u dimensions = _gpuTexture.evalMipDimensions(l);
|
Vec3u dimensions = _gpuTexture.evalMipDimensions(l);
|
||||||
for (GLenum target : getFaceTargets()) {
|
for (GLenum target : getFaceTargets()) {
|
||||||
|
|
|
@ -6,11 +6,14 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
#include <GenericQueueThread.h>
|
#include <GenericQueueThread.h>
|
||||||
#include "GLBackendShared.h"
|
#include "GLBackendShared.h"
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
#define THREADED_TEXTURE_TRANSFER
|
#define THREADED_TEXTURE_TRANSFER
|
||||||
|
#endif
|
||||||
|
|
||||||
class OffscreenGLCanvas;
|
class OffscreenGLCanvas;
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
||||||
CGLDescribeRenderer(rendererInfo, j, kCGLRPVideoMemoryMegabytes, &deviceVRAM);
|
CGLDescribeRenderer(rendererInfo, j, kCGLRPVideoMemoryMegabytes, &deviceVRAM);
|
||||||
if (deviceVRAM > bestVRAM) {
|
if (deviceVRAM > bestVRAM) {
|
||||||
bestVRAM = deviceVRAM;
|
bestVRAM = deviceVRAM;
|
||||||
|
_isValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue