Important: Please read the Qt Code of Conduct -

OpenGL - Using QOpenGLShaderProgram with GLM Math Library ...

  • Hello,

    I have a working OpenGL program written with the GLM math library for all of my Matrix mathematics, etc.

    I would like to convert my program to use Qt; the problem I am running into is when I would like to use QOpenGLShaderProgram to upload my uniforms/attributes/etc. to the graphics card.

    QOpenGLShaderProgram has nifty functions like setAttribute* and setUniform* for these items but they don't seem to accept the value pointers from GLM.

    Am I mistaken?

    Long story short, would I have to convert GLM datatypes to Qt datatypes for efficiency purposes or is there a way for the QOpenGLShaderProgram to accept the value pointers to the GLM data types so I don't have to convert the data from GLM.

    I am willing to convert to Qt datatypes to keep from having to convert from GLM datatypes to Qt datatypes in memory but I would like to avoid doing so.

    Thank you.

Log in to reply