Shader variables
[Inventor Shader API.]

VSG extension Open Inventor Shader API variables accessors. More...

VSG extension Open Inventor Shader API variables accessors.

Since OpenGL 3.2, a number of shader inputs and outputs like gl_FrontColor or gl_TexCoord are deprecated and not available anymore in Core Profile.

The aim of the functions in this API is to provide the same level of functionnality as those deprecated variables, while ensuring compatibility with Core Profile at the same time.

These methods are accessible by including the <Inventor/oivShaderVariables.h> header in your shader:

 void main()
 {
   // legacy code: gl_FragColor = gl_Color;
   OivFragmentOutput(OivFragmentColor());
 }

For each function in this API, the documentation in oivShaderVariables.h explains in which shader stage it is available and which legacy variable corresponds to it. Usually, the name of the function is rather transparent compared to the name of the corresponding deprecated variable. For example, OivSetFrontColor(vec4 color) sets the value corresponding to the legacy gl_FrontColor.


Open Inventor Toolkit reference manual, generated on 28 Oct 2019
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/