[Development] Qt5 and opengl core dependence

Samuel Rødal samuel.rodal at nokia.com
Thu Nov 3 09:13:50 CET 2011


On 11/03/2011 01:28 AM, ext martin ribelotta wrote:
> I'm trying to build qtbase (Qt5) with this options:
>
> ./configure -v -qpa -developer-build -fast -opensource \
>          -no-accessibility \
>          -no-qt3support \
>          -no-xmlpatterns \
>          -no-multimedia \
>          -no-audio-backend \
>          -no-phonon \
>          -no-phonon-backend \
>          -no-svg \
>          -no-webkit \
>          -no-javascript-jit \
>          -no-script \
>          -no-scripttools \
>          -no-v8 \
>          -no-declarative \
>          -no-declarative-debug \
>          -no-opengl \
>          -no-glib
>
> but when compiling the kernel, QtGui fails with dependency on OpenGL
> even though I run configure with the flag "-no-opengl"
>
> ...
> /home/martin/Proyectos/wayland-qt/qtbase/src/gui/opengl/qopenglframebufferobject.cpp:397:
> undefined reference to `glGetError'
> /home/martin/Proyectos/wayland-qt/qtbase/src/gui/opengl/qopenglframebufferobject.cpp:408:
> undefined reference to `glGetError'
> /home/martin/Proyectos/wayland-qt/qtbase/src/gui/opengl/qopenglframebufferobject.cpp:411:
> undefined reference to `glGenTextures'
> /home/martin/Proyectos/wayland-qt/qtbase/src/gui/opengl/qopenglframebufferobject.cpp:412:
> undefined reference to `glBindTexture'
> /home/martin/Proyectos/wayland-qt/qtbase/src/gui/opengl/qopenglframebufferobject.cpp:414:
> undefined reference to `glTexImage2D'
> /home/martin/Proyectos/wayland-qt/qtbase/src/gui/opengl/qopenglframebufferobject.cpp:418:
> undefined reference to `glTexParameter
> ...
>
> I try to modify src/gui/gui.pro temporarily with:
>
> ...
> include(util/util.pri)
> include(math3d/math3d.pri)
> # include(opengl/opengl.pri)
> # include(egl/egl.pri)
> ...
>
> But newly it fails with:
>
> /home/martin/Proyectos/wayland-qt/qtbase/src/gui/kernel/qopenglcontext.cpp:498:
> undefined reference to
> `QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext*)'
>
> Linking error...
>
> My cuestion is:
>
> "-no-opengl" flag will be supported in Qt5? Is it temporarily? If
> not... why? The embedded world (ARM9 and Cortex A8 without GPU)  will
> be seriously affected if can't compile Qt without opengl-[es|es2]/egl
> and use only raster paint engine
>
> PD: Excuse me for my english (I am spanish speaker/writer/reader ;-D )

I don't see a reason why it couldn't be supported. Could you try the 
following diff to src/gui/opengl/opengl.pri ?

diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri
index 3c5ab93..0cdc0b3 100644
--- a/src/gui/opengl/opengl.pri
+++ b/src/gui/opengl/opengl.pri
@@ -4,6 +4,7 @@ contains(QT_CONFIG, opengl):CONFIG += opengl
  contains(QT_CONFIG, opengles2):CONFIG += opengles2
  contains(QT_CONFIG, egl):CONFIG += egl

+contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) {
  HEADERS += opengl/qopengl.h \
             opengl/qopengl_p.h \
             opengl/qopenglfunctions.h \
@@ -42,5 +43,6 @@ SOURCES += opengl/qopengl.cpp \
             opengl/qopengltriangulatingstroker.cpp \
             opengl/qopengltextureglyphcache.cpp \
             opengl/qtriangulator.cpp
+}

  #INCLUDEPATH += ../3rdparty/harfbuzz/src

--
Samuel




More information about the Development mailing list