Cg Toolkit Cg 3.1 Toolkit Documentation
Cg / Profiles / glslv

Name

glslv - OpenGL vertex profile for the OpenGL Shading Language (GLSL)

Synopsis

  glslv

Description

This OpenGL profile corresponds to the per-vertex functionality introduced by the OpenGL Shading Language.

The compiler output for this profile conforms to the language grammar defined by the OpenGL Shading Language specification.

3D Api Dependencies

Requires OpenGL support for OpenGL 2.0.

Profile Options

version=val
GLSL version to target. Supported versions are 100, 110, 120, 130, 140, 150, 330, 400 and 410.
userTexCoord
Use user-defined varying instead of gl_TexCoord.
ATI_draw_buffers
Use ATI_draw_buffers extension for MRT.
EXT_gpu_shader4
Use EXT_gpu_shader4 extension where useful.

Data Types

The Cg half and fixed data types are both mapped to float because GLSL lacks first-class half and fixed data types.

Semantics

Varying Input Semantics

Binding Semantics Name           Corresponding Data           GLSL Equivalent

POSITION                         Object-space position        gl_Vertex
ATTR0

NORMAL                           Object-space normal          gl_Normal
ATTR2

COLOR                            Primary color (float4)       gl_Color
COLOR0
ATTR3
DIFFUSE

COLOR1                           Secondary color (float4)     gl_SecondaryColor
SPECULAR
ATTR4

FOGCOORD                         Fog coordinate               gl_FogCoord
ATTR5

TEXCOORD#                        Texture coordinate set #     gl_MultiTexCoord#
ATTR8                            Texture coordinate set 0
ATTR9                            Texture coordinate set 1
ATTR10                           Texture coordinate set 2
ATTR11                           Texture coordinate set 3
ATTR12                           Texture coordinate set 4
ATTR13                           Texture coordinate set 5
ATTR14                           Texture coordinate set 6
ATTR15                           Texture coordinate set 7

Uniform Input Semantics

Output Semantics

Binding Semantics Name         Corresponding Data        GLSL Equivalent

POSITION                       Clip-space position       gl_Position
HPOS

COLOR                          Front primary color       gl_FrontColor
COLOR0
COL0
COL

COLOR1                         Front secondary color     gl_FrontSecondaryColor
COL1

BCOL0                          Back primary color        gl_BackColor

BCOL1                          Back secondary color      gl_BackSecondaryColor

CLPV                           Clip vertex               gl_ClipVertex

TEXCOORD#                      Texture coordinate set #  gl_TexCoord[#}
TEX#

FOGC                           Fog coordinate            gl_FogFragCoord
FOG

PSIZE                          Point size                gl_PointSize
PSIZ

Standard Library Issues

Vertex texture fetches are supported only if the OpenGL implementation advertises a positive value for the implementation-dependent GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS limit.

See Also

glsl, glslg, glslf, cgGLSetContextGLSLVersion


Cg Toolkit | Cg Toolkit | Download | Release Archive | Profiles | Reference | Books | Discussions |


Cg Profiles

arbfp1
arbvp1
ds_5_0
fp20
fp30
fp40
glslf
glslg
glsl
glslv
gp4fp
gp4gp
gp4
gp4vp
gp5fp
gp5gp
gp5
gp5tcp
gp5tep
gp5vp
gs_4_0
gs_5_0
hlsl10
hlsl11
hlslf
hlslv
hs_5_0
ps_1_1
ps_1_2
ps_1_3
ps_2_0
ps_2_sw
ps_2_x
ps_3_0
ps_4_0
ps_5_0
vp20
vp30
vp40
vs_1_1
vs_2_0
vs_2_sw
vs_2_x
vs_3_0
vs_4_0
vs_5_0