Rechercher une page de manuel
glslv.3Cg
Langue: en
Version: 351824 (ubuntu - 24/10/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
glslv - OpenGL vertex profile for the OpenGL Shading Lanauge (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.OpenGL Extension Specifications
http://www.opengl.org/documentation/specs/version2.0/glspec20.pdf http://www.opengl.org/documentation/glsl/ http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf
PROFILE OPTIONS
None.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
The Cg profiles for GLSL provide access to all the uniform constants and variables documented in Section 7.4 (Built-in Constants) and 7.5 (Built-in Uniform State) respectively of the OpenGL Shading Language specification found at:
http://www.opengl.org/documentation/glsl/ http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdfExample:
glslv void main(float4 position : POSITION, out float4 opos : POSITION) { opos = mul(gl_ModelViewMatrix, position); }
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 program Cg standard library routines are available.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
glslg, glslfContenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre