|
Vertex Shaders
In "Modern" OpenGL |
|
Prof. David Bernstein
|
| Computer Science Department |
| bernstdh@jmu.edu |
layout statement in the shader
(e.g., layout(location = 0) in vec4 position;)
in int gl_VertexID:
in int gl_InstanceID:
glGetUniformLocation() to get a handle/name/IDglUniform____() to initializeuniform type
identifier;
out type
identifier
statementvec4 gl_Position - The clip-space position
of the vertexfloat gl_PointSize - The width and height of a
pixel (only meaningful for point primitives)float gl_ClipDistance - Distance to the clipping
plane (negative for outside)