SHA256
1
0
forked from pool/FreeCAD
FreeCAD/0001-Use-GL_RGB32F-instead-of-GL_RGB32F_ARB.patch
Adrian Schröter 30110a9aa1 Accepting request 676271 from home:StefanBruens:branches:science
- Fix build with GCC 8, add fix-gcc8-build-failure.patch
- Add 0001-Use-GL_RGB32F-instead-of-GL_RGB32F_ARB.patch, fix building
  on AArch64.
- Remove openmpi build dependencies, erroneously required for VTK
  previously.
  Drop 0001-find-openmpi2-include-files.patch

OBS-URL: https://build.opensuse.org/request/show/676271
OBS-URL: https://build.opensuse.org/package/show/science/FreeCAD?expand=0&rev=61
2019-02-15 07:37:23 +00:00

60 lines
2.6 KiB
Diff

From 2293eaf9f973cdda4e638bf00d4ddbbf02f4a54e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Sat, 12 Jan 2019 05:44:21 +0100
Subject: [PATCH] Use GL_RGB32F instead of GL_RGB32F_ARB
The GL_RGB32F{_ARB,_EXT,} constant has the same value in all three
variants, but the ARB variant is only available for Desktop OpenGL and
EXT is only available for GLES. Use the non-suffix variant from OpenGL
3.0 / GLES 3.
This allows building on platforms using GLES for Qt5, i.e. many ARM
platforms.
---
src/Gui/SoFCOffscreenRenderer.cpp | 4 ++--
src/Gui/View3DInventorViewer.cpp | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/Gui/SoFCOffscreenRenderer.cpp b/src/Gui/SoFCOffscreenRenderer.cpp
index d4eb3bc1e..6e26d2176 100644
--- a/src/Gui/SoFCOffscreenRenderer.cpp
+++ b/src/Gui/SoFCOffscreenRenderer.cpp
@@ -598,8 +598,8 @@ SoQtOffscreenRenderer::makeFrameBuffer(int width, int height, int samples)
// format and in the output image search for the above color and
// replaces it with the color requested by the user.
#if defined(HAVE_QT5_OPENGL)
- //fmt.setInternalTextureFormat(GL_RGBA32F_ARB);
- fmt.setInternalTextureFormat(GL_RGB32F_ARB);
+ //fmt.setInternalTextureFormat(GL_RGBA32F);
+ fmt.setInternalTextureFormat(GL_RGB32F);
#else
//fmt.setInternalTextureFormat(GL_RGBA);
fmt.setInternalTextureFormat(GL_RGB);
diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp
index a1fee6459..21ed8a9e8 100644
--- a/src/Gui/View3DInventorViewer.cpp
+++ b/src/Gui/View3DInventorViewer.cpp
@@ -1416,7 +1416,7 @@ QImage View3DInventorViewer::grabFramebuffer()
fboFormat.setSamples(getNumSamples());
fboFormat.setAttachment(QOpenGLFramebufferObject::Depth);
fboFormat.setTextureTarget(GL_TEXTURE_2D);
- fboFormat.setInternalTextureFormat(GL_RGB32F_ARB);
+ fboFormat.setInternalTextureFormat(GL_RGB32F);
QOpenGLFramebufferObject fbo(width, height, fboFormat);
renderToFramebuffer(&fbo);
@@ -1449,8 +1449,8 @@ void View3DInventorViewer::imageFromFramebuffer(int width, int height, int sampl
// format and in the output image search for the above color and
// replaces it with the color requested by the user.
#if defined(HAVE_QT5_OPENGL)
- //fboFormat.setInternalTextureFormat(GL_RGBA32F_ARB);
- fboFormat.setInternalTextureFormat(GL_RGB32F_ARB);
+ //fboFormat.setInternalTextureFormat(GL_RGBA32F);
+ fboFormat.setInternalTextureFormat(GL_RGB32F);
#else
//fboFormat.setInternalTextureFormat(GL_RGBA);
fboFormat.setInternalTextureFormat(GL_RGB);
--
2.20.1