OpenGL ES 3.3 on IOS is not supported



  • I just started with developing on QT. I am working with Qt 5.8.0. I started my application with testing it on the computer. I found some solutions to set my version of QT to 3.3 by:

    QSurfaceFormat glFormat;
    glFormat.setVersion(3, 3);
    glFormat.setDepthBufferSize(24);
    glFormat.setProfile(QSurfaceFormat::CoreProfile);
    QSurfaceFormat::setDefaultFormat(glFormat);

    And actually is everything working fine. But now I want to test my application on the iPhone. I started by testing it with the IOS simulator. But my, my shaders won't compile because of the error :

    QOpenGLShader::compile(Vertex): ERROR: 0:2: '' : version '330' is not supported

    and also my FBO's.
    Is there anything I have to set up differently for developing my application on IOS? Is there an working example for QT for GLSL ES 3.3. ?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    From the Apple iOS OpenGLES Guide, iOS currently supports the 3.0 version.



  • If I change it to version 3.0 I get the error:
    QOpenGLShader::compile(Vertex): ERROR: 0:3: '' : syntax error: #version

    *** Problematic Vertex shader source code ***
    /* final.vsh */
    #version 300
    #line 2

    for building on IOS and the error:
    QOpenGLShader::compile(Vertex): ERROR: 0:2: '' : version '300' is not supported
    for building on OS.

    I changed the version tag in the shader but also igFormat.setVersion(3,0);


  • Lifetime Qt Champion

    You should check what is the current format you got. What you request and what you get might be different like explained in QOpenGLContext::format



  • And ist there no way to force the version of the context? So to say I want that version!

    Computer:
    If I have setVersion(3,0) It says it has a context version of 2.1 oO
    and if I set it to setVersion(3,3) I will have version 4.1
    IOS:
    Both create a context of version 3.0

    So actually if I would set Format to 3.3, I would get a version of 3.0 in both and actually it should of worked then?


  • Lifetime Qt Champion

    The selection of a different version of OpenGL is explained in the link I posted earlier.

    So indeed, you should get the correct version for iOS.

    Did you try the silly thing of just commenting the version line ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.