mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 22:27:13 +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);
|
||||
(void)CHECK_GL_ERROR();
|
||||
} 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
|
||||
Vec3u dimensions = _gpuTexture.evalMipDimensions(l);
|
||||
for (GLenum target : getFaceTargets()) {
|
||||
|
|
|
@ -6,11 +6,14 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QSharedPointer>
|
||||
#include <GenericQueueThread.h>
|
||||
#include "GLBackendShared.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#define THREADED_TEXTURE_TRANSFER
|
||||
#endif
|
||||
|
||||
class OffscreenGLCanvas;
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
|||
CGLDescribeRenderer(rendererInfo, j, kCGLRPVideoMemoryMegabytes, &deviceVRAM);
|
||||
if (deviceVRAM > bestVRAM) {
|
||||
bestVRAM = deviceVRAM;
|
||||
_isValid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue