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: gl to uniform parameter binding semantics

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2002
    Location
    Houston, Tx, USA
    Posts
    25

    gl to uniform parameter binding semantics

    The cg language spec says, talking about position invariance...

    MVP is a uniform variable (or structure element) of type float4x4 with an input binding semantic that causes it to track the fixed-function modelview-projection matrix.(The name of this binding semantic is currently profile-specific—for OpenGL profiles, the semantic _GL_MVP is recommended).

    The arbvp1 profile provides the "glstate" variable that lets me access gl state from the vertex program, per the ARB_vertex_program extension.

    In the vp30 profile I think I can make a uniform parameter like this..
    uniform float4x4 mvp : _GL_MVP
    to bind the gl state to the uniform parameter. Is this right?

    How do I bind to other gl states? Where are the binding semantics defined for each profile? I'm hoping _GL_MVP is not the only state available in the vp30 profile.

    I hope I just can't find the documentation.

    Thanks

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    807

    Re: gl to uniform parameter binding semantics

    Cg questions are better asked at www.cgshaders.org. I'll move this thread to the shading language forum though, where someone might be able to answer your question.

    -- Tom

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

    Re: gl to uniform parameter binding semantics

    >>I just can't find the documentation.<<
    http://developer.nvidia.com/object/cg_toolkit.html


    Looks like there is only one explicit matrix binding _GL_MVP for vp30 and only used for position invariance reasons.

    [This message has been edited by Relic (edited 01-29-2004).]

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2002
    Location
    Houston, Tx, USA
    Posts
    25

    Re: gl to uniform parameter binding semantics

    If in general I can't see the gl state from the shader, that means I have to rebind the shader whenever the state changes, right? And that means that display lists with projection matrix changes can not work, because the shader will not see the state change, right?

Posting Permissions

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