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

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

>>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).]

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?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.