Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Getting the value of a GLSL program in a C++ program

  1. #1
    Super Moderator Frequent Contributor Groovounet's Avatar
    Join Date
    Jul 2004
    Posts
    936

    Getting the value of a GLSL program in a C++ program

    I want to get the value of a GLSL variable (uniform or attrib) after GLSL program execution.
    Is there any solution to do this ?

  2. #2
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: Getting the value of a GLSL program in a C++ program

    yes there are glGet .. commands see the spec for detailed info

  3. #3
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,527

    Re: Getting the value of a GLSL program in a C++ program

    If you mean that the GLSL program should have changed the values of uniforms or attribs during it's run, then no, this is not possible.
    glGet commands get the current state, that is the state the user set last.
    Final results of GLSL programs are color and depth buffer contents and you can read from there.

  4. #4
    Super Moderator Frequent Contributor Groovounet's Avatar
    Join Date
    Jul 2004
    Posts
    936

    Re: Getting the value of a GLSL program in a C++ program

    Thank you to this information.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •