Important: Please read the Qt Code of Conduct -

QOpenGlWidget problems in Mac OSX and Windows.

  • Hi,
    I'm making a cross platform desktop app with Qt and opengl, using QOpenGLWidget.
    I'm developing it at linux and works great, but i found some problems in the other os.

    • Windows: I have to use 'Qt::AA_UseSoftwareOpengl'.. either way application crashes. I assume this affects performance.. is that true? How can i get desktop opengl working on Windows?

    • Mac OSX: i've already set custom format as it's stated in other questions. I get no errors in the console, but nothing gets rendered. IDK what to do.

    Any hints?

  • Lifetime Qt Champion

    What Qt version are you using ?
    For Windows, did you try upgrade your GFX drivers and check OpenGL is working as expected ?

  • @mrjj Hi! thanks for the answer. I'm using Qt 5.12.2. How would you recommend me to check on windows if opengl is working fine?
    And most important, is there anything i need to do to use GLSL 3.30 core shaders in MAC? cause i cannot currently distribute my app on that platform... or should i port shaders to GLES?

  • Lifetime Qt Champion

    First of all. does any of the Qt samples run ?
    Second, you can run any other app know uses openGL to check.
    or use a tool like
    ( its portable)
    It lists the openGl version etc.
    alt text

    Sorry, I cant answer about Macs.

  • @mrjj Hi! thanks again...
    I'm able to run Qt opengl examples, but they are made with GLES i think, and i need core.

    With that tool you shared me apparently my gpu driver only supports OpenGL v1. So either i need to update my windows machine or use that opengl version, am i right?

  • @mrjj Hi! Now i tried in another computer, and it does not crash anymore in windows, but it also does not render anything... It clears the openglwidget to the right color, but does not render my textures.. with software openg works as expected in windows, but doesn't in MAC.. only in Linux is working fine. Any hints?

  • Lifetime Qt Champion

    Do you have any test sample i could try to see if it runs on mine ?

  • @mrjj Hi! yes, i'll send you a test i've been doing. I'm not at home these days, so i'll send it to you when i'm back.
    By now, i've ported all to GLES 3, and i'll also test if it works better with ES than core in windows an MAC.

  • @mrjj Hi!
    I've got a better windows pc, and now it works! thanks!
    The code i'm working at is this:
    Now i'm having some problems to render into a framebuffer to do some post processing... but i guess this is for another topic.
    PD: I could not solve MAC issues yet.

Log in to reply