openage icon indicating copy to clipboard operation
openage copied to clipboard

OpenGL ES on Raspberry PI compilation fails

Open phoenixbyrd opened this issue 5 years ago • 4 comments

/home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp: In function ‘qtsdl::gl_debug_parameters qtsdl::get_current_opengl_debug_parameters(const QOpenGLContext&)’:
/home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp:21:46: error: ‘QOpenGLFunctions_4_4_Core’ was not declared in this scope
  if (current_source_context.versionFunctions<QOpenGLFunctions_4_4_Core>())
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp:21:46: note: suggested alternative: ‘QOpenGLFunctionsPrivate’
  if (current_source_context.versionFunctions<QOpenGLFunctions_4_4_Core>())
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
                                              QOpenGLFunctionsPrivate
/home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp:21:73: error: no matching function for call to ‘QOpenGLContext::versionFunctions<<expression error> >() const’
  if (current_source_context.versionFunctions<QOpenGLFunctions_4_4_Core>())
                                                                         ^
In file included from /usr/include/arm-linux-gnueabihf/qt5/QtGui/qopenglfunctions.h:55,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtGui/QOpenGLFunctions:1,
                 from /home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.h:5,
                 from /home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp:3:
/usr/include/arm-linux-gnueabihf/qt5/QtGui/qopenglcontext.h:194:11: note: candidate: ‘template<class TYPE> TYPE* QOpenGLContext::versionFunctions() const’
     TYPE *versionFunctions() const
           ^~~~~~~~~~~~~~~~
/usr/include/arm-linux-gnueabihf/qt5/QtGui/qopenglcontext.h:194:11: note:   template argument deduction/substitution failed:
/home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp:21:73: error: template argument 1 is invalid
  if (current_source_context.versionFunctions<QOpenGLFunctions_4_4_Core>())
                                                                         ^
/home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp: In function ‘void qtsdl::apply_opengl_debug_parameters(qtsdl::gl_debug_parameters, QOpenGLContext&)’:
/home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp:32:62: error: ‘QOpenGLFunctions_4_4_Core’ was not declared in this scope
   if (auto functions = current_dest_context.versionFunctions<QOpenGLFunctions_4_4_Core>()) {
                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp:32:62: note: suggested alternative: ‘QOpenGLFunctionsPrivate’
   if (auto functions = current_dest_context.versionFunctions<QOpenGLFunctions_4_4_Core>()) {
                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                              QOpenGLFunctionsPrivate
/home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp:32:89: error: no matching function for call to ‘QOpenGLContext::versionFunctions<<expression error> >()’
   if (auto functions = current_dest_context.versionFunctions<QOpenGLFunctions_4_4_Core>()) {
                                                                                         ^
In file included from /usr/include/arm-linux-gnueabihf/qt5/QtGui/qopenglfunctions.h:55,
                 from /usr/include/arm-linux-gnueabihf/qt5/QtGui/QOpenGLFunctions:1,
                 from /home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.h:5,
                 from /home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp:3:
/usr/include/arm-linux-gnueabihf/qt5/QtGui/qopenglcontext.h:194:11: note: candidate: ‘template<class TYPE> TYPE* QOpenGLContext::versionFunctions() const’
     TYPE *versionFunctions() const
           ^~~~~~~~~~~~~~~~
/usr/include/arm-linux-gnueabihf/qt5/QtGui/qopenglcontext.h:194:11: note:   template argument deduction/substitution failed:
/home/pi/openage/libopenage/gui/guisys/private/opengl_debug_logger.cpp:32:89: error: template argument 1 is invalid
   if (auto functions = current_dest_context.versionFunctions<QOpenGLFunctions_4_4_Core>()) {
                                                                                         ^
make[2]: *** [libopenage/CMakeFiles/libopenage.dir/build.make:1441: libopenage/CMakeFiles/libopenage.dir/gui/guisys/private/opengl_debug_logger.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1540: libopenage/CMakeFiles/libopenage.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

phoenixbyrd avatar May 14 '20 10:05 phoenixbyrd

I guess you need to add preprocessor-switches there to use OpenGL ES :) I'm not sure what else is needed to support the RasPI 4.

TheJJ avatar May 14 '20 11:05 TheJJ

How would I go about trying that? I am learning this as I go. I just can't resolve this issue.

phoenixbyrd avatar May 14 '20 11:05 phoenixbyrd

Keep removing code until it compiles. Then it'll be a clear summary of what to fix.

The opengl_debug_logger stuff is not essential and those functions aren't in OpenGL ES 3.1.

Overall it should probably work on Pi.

VelorumS avatar May 14 '20 20:05 VelorumS

:) Yes, that's probably the best way to figure out how to add GLES.

We've had a longer discussion in the matrix chatroom, but it remains a TODO to properly add support for OpenGL ES. If anyone is interested in tackling this, feel free to give it a go (or ask for further instructions).

TheJJ avatar May 17 '20 19:05 TheJJ