Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Automatically get parameters of a QOpenGLShaderProgram?
wrosecrans last edited by
QOpenGLShaderProgram has a bunch of convenience functions for setAttributeValue("my_parameter_name", someValue); but you have to know the parameters of a shder in advance. If I am trying to wire up a UI automatically that will look at a shader and then present the user with a dialog with various settings, I need to figure out what those available attributes/uniforms are that I could set the values of. Does Qt have any convenience classes or methods for interrograting a shader like that? Either the source, or the linked shader program? Or, failing that, is there a convenient way to do it using raw OpenGL without some Qt convenience class?
This is outside my knowledge
but as far as i know, there is no convenient class for enumerating the shader
attributes. At least i never saw one.
I was wondering if you could reuse
or similar parser.