Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65059

OpenGL header included publicly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.10.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Android

      Description

      I am getting conflicts with OpenGL ES declarations, because I need to include OpenGL ES 3.2 headers while targeting Android 4.1 - SDK API: 16 which only provide OpenGL ES 2.0 headers.

       

      As our 3D engine detect the OpenGL version of the context at runtime we can support both version of OpenGL but headers in the ndk aren't incremental, that why we can only include one version (we have a copy of GLES3 headers to be able to use them with sdk 16).

       

      The issue is that QQuickView include OpenGL ES headers based on the sdk version. I thought that Qt doesn't need to include OpenGL publicly anymore, here is the inclusion stack:
       

      In file included from ..\..\..\..\sdks\Qt\5.10.0\android_armv7\include/QtGui/qopengl.h:111:0,
      from ..\..\..\..\sdks\Qt\5.10.0\android_armv7\include/QtQuick/qsggeometry.h:44,
      from ..\..\..\..\sdks\Qt\5.10.0\android_armv7\include/QtQuick/qsgnode.h:43,
      from ..\..\..\..\sdks\Qt\5.10.0\android_armv7\include/QtQuick/qsgrendererinterface.h:43,
      from ..\..\..\..\sdks\Qt\5.10.0\android_armv7\include/QtQuick/qquickwindow.h:44,
      from ..\..\..\..\sdks\Qt\5.10.0\android_armv7\include/QtQuick/qquickview.h:43,
      from ..\..\..\..\sdks\Qt\5.10.0\android_armv7\include/QtQuick/QQuickView:1,
      from ..\..\Source\GUI_QML\qtquick2applicationviewer/qtquick2applicationviewer.h:14,
      from ..\..\Source\GUI_QML\H3DDeclarativeView.h:9,
      from ..\..\Source\GUI_QML\ApplicationWrapper.cpp:6:
      C:\sdks\android-ndk-r10e/platforms/android-16/arch-arm/usr/include/GLES2/gl2.h: At global scope:
      C:\sdks\android-ndk-r10e/platforms/android-16/arch-arm/usr/include/GLES2/gl2.h:572:125: error: conflicting declaration of C function 'void glShaderSource(GLuint, GLsizei, const GLchar**, const GLint*)'
      GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
      

       

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            sletta Gunnar Sletta
            Reporter:
            flamaros Xavier Bigand
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes