Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. error: GLSL 3.30 is not supported
Forum Updated to NodeBB v4.3 + New Features

error: GLSL 3.30 is not supported

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 8.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MicPiano
    wrote on 6 Jul 2016, 06:56 last edited by
    #1

    I'm trying to learn qt-opengl by myself and has ran into a problem. I am following this tutorial with some modifications and everything compiles perfectly. However when I run I get the following message:

    QOpenGLShader::compile(Vertex): 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
    
    *** Problematic Vertex shader source code ***
    #version 330 core
    #define lowp
    #define mediump
    #define highp
    #line 2
    layout(location = 0) in vec3 position;
    layout(location = 1) in vec3 color;
    out vec4 vColor;
    
    void mian()
    {
        gl_Position = vec4(position, 1.0);
        vColor = vec4(color, 1.0f);
    }
    
    ***
    QOpenGLShader::compile(Fragment): 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
    
    *** Problematic Fragment shader source code ***
    #version 330 core
    #define lowp
    #define mediump
    #define highp
    #line 2
    in vec4 vColor;
    out vec4 fColor;
    
    void main()
    {
        fColor = vColor;
    }
    

    I am using Qt 5.7 on Ubuntu16.04
    my 'glxinfo | grep 'version' has the following output

    server glx version string: 1.4
    client glx version string: 1.4
    GLX version: 1.4
        Max core profile version: 3.3
        Max compat profile version: 3.0
        Max GLES1 profile version: 1.1
        Max GLES[23] profile version: 3.0
    OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0
    OpenGL core profile shading language version string: 3.30
    OpenGL version string: 3.0 Mesa 11.2.0
    OpenGL shading language version string: 1.30
    OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.2.0
    OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
    

    I don't understand why it GLSL3.30 is not supported

    ? 1 Reply Last reply 6 Jul 2016, 08:17
    0
    • M MicPiano
      6 Jul 2016, 06:56

      I'm trying to learn qt-opengl by myself and has ran into a problem. I am following this tutorial with some modifications and everything compiles perfectly. However when I run I get the following message:

      QOpenGLShader::compile(Vertex): 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
      
      *** Problematic Vertex shader source code ***
      #version 330 core
      #define lowp
      #define mediump
      #define highp
      #line 2
      layout(location = 0) in vec3 position;
      layout(location = 1) in vec3 color;
      out vec4 vColor;
      
      void mian()
      {
          gl_Position = vec4(position, 1.0);
          vColor = vec4(color, 1.0f);
      }
      
      ***
      QOpenGLShader::compile(Fragment): 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
      
      *** Problematic Fragment shader source code ***
      #version 330 core
      #define lowp
      #define mediump
      #define highp
      #line 2
      in vec4 vColor;
      out vec4 fColor;
      
      void main()
      {
          fColor = vColor;
      }
      

      I am using Qt 5.7 on Ubuntu16.04
      my 'glxinfo | grep 'version' has the following output

      server glx version string: 1.4
      client glx version string: 1.4
      GLX version: 1.4
          Max core profile version: 3.3
          Max compat profile version: 3.0
          Max GLES1 profile version: 1.1
          Max GLES[23] profile version: 3.0
      OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0
      OpenGL core profile shading language version string: 3.30
      OpenGL version string: 3.0 Mesa 11.2.0
      OpenGL shading language version string: 1.30
      OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.2.0
      OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
      

      I don't understand why it GLSL3.30 is not supported

      ? Offline
      ? Offline
      A Former User
      wrote on 6 Jul 2016, 08:17 last edited by
      #2

      @MicPiano Hi, welcome to the Qt forum! Try removing the "core" from the version declaration: #version 330.

      M 1 Reply Last reply 6 Jul 2016, 08:36
      1
      • ? A Former User
        6 Jul 2016, 08:17

        @MicPiano Hi, welcome to the Qt forum! Try removing the "core" from the version declaration: #version 330.

        M Offline
        M Offline
        MicPiano
        wrote on 6 Jul 2016, 08:36 last edited by MicPiano 7 Jun 2016, 08:56
        #3

        @Wieland Initially I didn't have that. I was thinking maybe it's a good idea to use the core profile? Long story short, It still doesn't work. By the way, The difference of my code and the tutorial is that I uses QOpenGLWidget instead of QWindow for implementation.

        ? 1 Reply Last reply 6 Jul 2016, 09:07
        0
        • M MicPiano
          6 Jul 2016, 08:36

          @Wieland Initially I didn't have that. I was thinking maybe it's a good idea to use the core profile? Long story short, It still doesn't work. By the way, The difference of my code and the tutorial is that I uses QOpenGLWidget instead of QWindow for implementation.

          ? Offline
          ? Offline
          A Former User
          wrote on 6 Jul 2016, 09:07 last edited by A Former User 7 Jun 2016, 09:09
          #4

          Okay. Then try to explicitly set the default surface format, in main.cpp:

          int main(int argc, char *argv[])
          {
              QApplication a(argc, argv);
              QSurfaceFormat fmt;
              fmt.setVersion( 3, 3 );
              fmt.setProfile( QSurfaceFormat::CoreProfile );
              QSurfaceFormat::setDefaultFormat( fmt );
          //...
          

          (#version 330 should default to #version 330 core anyways)

          M 1 Reply Last reply 6 Jul 2016, 09:38
          0
          • ? A Former User
            6 Jul 2016, 09:07

            Okay. Then try to explicitly set the default surface format, in main.cpp:

            int main(int argc, char *argv[])
            {
                QApplication a(argc, argv);
                QSurfaceFormat fmt;
                fmt.setVersion( 3, 3 );
                fmt.setProfile( QSurfaceFormat::CoreProfile );
                QSurfaceFormat::setDefaultFormat( fmt );
            //...
            

            (#version 330 should default to #version 330 core anyways)

            M Offline
            M Offline
            MicPiano
            wrote on 6 Jul 2016, 09:38 last edited by
            #5

            @Wieland Thank you for the elegant solution!! Moreover than that, I found that in my vertex file I miss typed main as mian

            1 Reply Last reply
            0

            2/5

            6 Jul 2016, 08:17

            • Login

            • Login or register to search.
            2 out of 5
            • First post
              2/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved