OpenGL

Fundamentals

Terminology

OpenGL Shading Language -- GLSL

Excerpts from Wikipedia.

Variable types

C has a number of basic types. GLSL uses some of these, but adds many more.

Type qualifiers

GLSL's uses a large number of qualifiers to specify where the values that various variables contain come from. Qualifiers also modify how those variables can be used.

Interface blocks

Certain variable definitions can be grouped into interface blocks. These can be used to make communication between different shader stages easier, or to allow storage for variables to come from a buffer object.

Predefined variables

The different shader stages have a number of predefined variables for them. These are provided by the system for various system-specific use.

Uniforms

Uniforms in GLSL are shader variables that are set from user code, but only are allowed to change between different glDraw* calls. Uniforms can be queried and set by the code external to a particular shader. Uniforms can be arranged into blocks, and the data storage for these blocks can come from buffer objects.

Samplers

Samplers are special types which must be defined as uniforms. They represent bound textures in the OpenGL context. They are set like integer, 1D uniform values.

Interpolation

Shaders

results matching ""

    No results matching ""