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. Automatically get parameters of a QOpenGLShaderProgram?

Automatically get parameters of a QOpenGLShaderProgram?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 264 Views
  • 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.
  • W Offline
    W Offline
    wrosecrans
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      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
      https://github.com/graphitemaster/glsl-parser
      or similar parser.

      1 Reply Last reply
      1

      • Login

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