Merge pull request #2183 from ts-korhonen/qt-opengl-renderer
qt: fix linux arm32 build error
This commit is contained in:
@@ -202,7 +202,7 @@ OpenGLRenderer::getOptions(QWidget *parent)
|
||||
void
|
||||
OpenGLRenderer::setupExtensions()
|
||||
{
|
||||
#ifndef Q_OS_MACOS
|
||||
#ifndef NO_BUFFER_STORAGE
|
||||
if (context->hasExtension("GL_ARB_buffer_storage")) {
|
||||
hasBufferStorage = true;
|
||||
|
||||
@@ -219,7 +219,7 @@ OpenGLRenderer::setupBuffers()
|
||||
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, unpackBufferID);
|
||||
|
||||
if (hasBufferStorage) {
|
||||
#ifndef Q_OS_MACOS
|
||||
#ifndef NO_BUFFER_STORAGE
|
||||
/* Create persistent buffer for pixel transfer. */
|
||||
glBufferStorage(GL_PIXEL_UNPACK_BUFFER, BUFFERBYTES * BUFFERCOUNT, NULL, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT);
|
||||
|
||||
|
@@ -17,13 +17,17 @@
|
||||
#ifndef QT_OPENGLRENDERER_HPP
|
||||
#define QT_OPENGLRENDERER_HPP
|
||||
|
||||
#if defined Q_OS_MACOS || __arm__
|
||||
# define NO_BUFFER_STORAGE
|
||||
#endif
|
||||
|
||||
#include <QOpenGLContext>
|
||||
#include <QOpenGLExtraFunctions>
|
||||
#include <QResizeEvent>
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
#include <QWindow>
|
||||
#if !defined Q_OS_MACOS && !(QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
#if !defined NO_BUFFER_STORAGE && !(QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
# include <QtOpenGLExtensions/QOpenGLExtensions>
|
||||
#endif
|
||||
|
||||
@@ -94,7 +98,7 @@ private:
|
||||
|
||||
/* GL_ARB_buffer_storage */
|
||||
bool hasBufferStorage = false;
|
||||
#ifndef Q_OS_MACOS
|
||||
#ifndef NO_BUFFER_STORAGE
|
||||
PFNGLBUFFERSTORAGEPROC glBufferStorage = nullptr;
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user