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 3 of 3

Thread: glSlang parameter binding

  1. #1
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,979

    glSlang parameter binding

    I would like to strat a discussion about glSlang constants one more time. ARB_*_program have a very nice object-oriented binding syntax. Why did ARB gave it up in glSlang specification? I couldn't find any features like automatic matrix inverse/etc. computation, and it makes the things a bit more complicated and messy. And I don't want to end up writing gl_modelview all the time - I don't like the name. The GL_MATRIX*_ARB support is also a nice feature which I miss. I thing, the specs should be changed before it's not too late. It would be nice to have gl_state predefined struct in the shading language.

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2002
    Location
    Austria
    Posts
    328

    Re: glSlang parameter binding

    Additional matrix stacks would be really great, yeah! But I think the minumum GL_ATRIX*_ARB stack depth is 1 (and I think many implementation only have a stack depth of 1) so there is no really stack. But this is exactly what I don't want to have. I'd like to have a real stack.

    Automatic matrix inverse? Where is that defined in ARB_*_program? Or do you mean transpose?

    The gl_modelview isn't that bad. If you don't like it define your own name! :-)

    The idea with gl_state is great, yeah!
    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

    There is another theory which states that this has already happened...

  3. #3
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,979

    Re: glSlang parameter binding

    Inverse: like state.modelview.inverse etc.
    The same with NV_*_program, glTrackMatrixNV, you can specify the transform. But with glSlang you must compute all of them manually. As I mentioned already, to get the inverse of projection matrix you must do glGetf + transform on CPU + glUniform*
    In ARB_*_program: state.projection.inverse

Posting Permissions

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