New tokens for use by GetActiveUniform() and
GetActiveUniformsiv()
Table 2.10 adds the following tokens:
SAMPLER_BUFFER, INT_SAMPLER_BUFFER,
INT_SAMPLER_2D_RECT, UNSIGNED_INT_SAMPLER_BUFFER, and
UNSIGNED_INT_SAMPLER_2D_RECT
Uniforms in a named uniform block may not be modified using the
Uniform* commands. (Previously the spec said they may be
modified, however this was likely a typographical error).
TransformFeedbackVaryings() no longer generates INVALID_VALUE if
"program" is not the name of a program object (presumably an
oversight).
The minimum number of client-defined halfspaces available for
clipping has been increased from 6 to 8 (probably just fixing a
spec bug, since both GL 3.1 and GL 3.2 list MAX_CLIP_DISTANCES=8
in their state tables).
Though is not explicitly stated, it appears that primitive restart
should *not* restart the gl_VertexID index.
An undetected attempt to read data from a mapped buffer object has
undefined results, and may result in GL interruption or
termination.
Most, but not all GL commands will detect attempts to read data
from a mapped buffer object. (Previously all commands did so.)
For type FLOAT_32_UNSIGNED_INT_24_8_REV, "data" must be evenly
divisible by 4.
Commands such as TexParameter(), TexImage(), BindTexture(), and
queries of all such state no longercheck the texture image unit
number against MAX_COMBINED_TEXTURE_IMAGE_UNITS.
Verbiage related to fragment color clamping is removed.
SRGB conversion is no longer switched off by disabling
FRAMEBUFFER_SRGB. It now happens whenever
FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING is SRGB.
Passing the constants FRONT, BACK, LEFT, RIGHT, or FRONT_AND_BACK
to DrawBuffers() results in INVALID_ENUM. (Previously, it
resulted in INVALID_OPERATION).
Clear() may now be passed a bitfield of zero, causing no buffers
to be cleared.
Blit operations: format conversion rules are cleaned up so that
the only conversion that is possible is between floating and fixed
point (the 3.1 spec seems buggy, so this is likely a clarification
rather than a deliberate change in functionality).
Rendering commands and commands that read the framebuffer will
generate INVALID_FRAMEBUFFER_OPERATION if called while the
framebuffer is not framebuffer complete, *even* if no fragments
are read/written to the framebuffer (for example,
RASTERIZER_DISCARD does not prevent
INVALID_FRAMEBUFFER_OPERATION). (This is likely a clarification
rather than an explicit change in functionality).
Texture state queries no longer result in INVALID_OPERATION error
if the value of ACTIVE_TEXTURE is greater than or equal to
MAX_COMBINED_TEXTURE_IMAGE_UNITS.
In implementation dependent aggregate shader limits (table 6.44),
MAX_VARYING_COMPONENTS is reduced from 64 to 60.
In implementation dependent version and extension support (table
6.40), MAJOR_VERSION now has a minimum value of 3 (presumably it's
just an oversight that this wasn't included in OpenGL 3.1).
In miscellaneous (table 6.47), TEXTURE_BUFFER is removed
(presumably an oversight?)
In program object state (table 6.30), UNIFORM_BUFFER_START and
UNIFORM_BUFFER_SIZE are added.
In vertex array object state (table 6.4), VERTEX_ATTRIB_ARRAY_SIZE
now has type "16 * xZ5" (previously was "16 * xZ")
The requirement that "polygon shading is completed before polygon
mode is interpreted" is dropped.
Renderbuffer objects are added to the list of objects that can be
shared between contexts.
When a buffer, texture, or renderbuffer object is deleted, bind
points in other contexts are not affected.
Names remain valid until the underlying object can be deleted
because it is no longer in use. However, names are immediately
marked unused at the time of deletion, so they may be returned by
future Gen* commands even if the name is still in use (this
appears to be a clarification, not a change in behaviour).
Wide lines are deprecated
Only the output variables that are read by the subsequent pipeline
stage need to be written; it is allowed to have superfluous
declarations of output variables.
Layout declarations can only be made at global scope.
Layout qualifiers can appear with an individual variable declared
with an interface qualifier (i.e. a single "in", "out", or
"uniform" variable outside of any interface block).
Order is not important within a layout-qualifier-id-list (with
certain exceptions).
The tokens in a layout-qualifier-id-list are identifiers, not
keywords.
The tokens in a layout-qualifier-id-list are not case-sensitive
(with certain exceptions).
Vertex shaders have no input layout qualifiers.
Fragment shaders cannot have output layout qualifiers.
Vertex shaders cannot have output layout qualifiers.
No statements are allowed in a switch statement before the first
case statement.
It is now an error for the set of shaders forming a program to
statically read or write both gl_ClipVertex and gl_ClipDistance
(previously, it was only an error for a *shader*, not the set of
shaders forming a program, and it was only an error to statically
*write* to both, not to read).
The minimum value allowed for gl_MaxCombinedTextureImageUnits has
been increased from 16 to 48.
The minimum value allowed for gl_MaxVaryingFloats and
gl_MaxVaryingComponents has been reduced from 64 to 60.
The minimum value allowed for gl_MaxTextureUnits has been reduced
from 16 to 2.
gl_MaxTextureCoords (min: 8) is added.
gl_MaxTextureUnits is now only available in the compatibility
profile (previously it was always available).
In the compatibility profile, the GL can provide fixed
functionality behavior for any programmable pipeline stage. This
is not allowed in the core profile.
The function determinant() is added.
"type_qualifier" rules are revised to eliminate recursion.
New rule for "type_qualifier": invariant.
Rule "INVARIANT IDENTIFIER" for "single_declaration" is no longer
vertex only.
VertexAttribPointer generates INVALID_VALUE if size == GL_BGRA and
normalized == GL_FALSE.
VertexAttribPointer generates INVALID_VALUE if size == GL_BGRA and
type != GL_UNSIGNED_BYTE.
VertexAttribPointer now accepts a "size" of GL_BGRA, which
indicates four value, but reverses the order of the first through
third values of each array element.
Texture border size ("bs") is replaced with 0 in the texel fetch
equations.
Reference to TEXTURE_BORDER is dropped from the list of
requirements in order to guarantee that a call to
CompressedTexSubImage1D, CompressedTexSubImage2D,
CompressedTexSubImage3D will not result in an INVALID_OPERATION
error.
Reference to border/TEXTURE_BORDER is dropped from the list of
values which must match in order to guarantee that a call to
CompressedTexImage1D, CompressedTexImage2D, or
CompressedTexImage3D will not result in an INVALID_OPERATION
error.
TEXTURE_BORDER queries are removed.
"i64" is added the the list of type descriptors which may appear
in GL function names.
The "GL Data Types" table is expanded to include int64 and uint64.
The type of BUFFER_SIZE, BUFFER_MAP_OFFSET, and BUFFER_MAP_LENGTH
has been changed from integer to int64.
GetInteger64i_v() is added.
GetInteger64v() is added.
GetBufferParameteri64v() is added.
In buffer object state (table 6.7), the following pieces of state
now use GetBufferParameteri64v: BUFFER_SIZE, BUFFER_MAP_OFFSET,
and BUFFER_MAP_LENGTH (previously these used GetBufferParameteriv)
In tranform feedback state (table 6.34),
TRANSFORM_FEEDBACK_BUFFER_START and TRANSFORM_FEEDBACK_BUFFER_SIZE
now use Getinteger64i_v (previously they used GetIntegeri_v).
When a *BaseVertex drawing command is used, the primitive restart
comparison occurs before the basevertex offset is added.
DrawElementsBaseVertex() is added.
DrawElementsInstancedBaseVertex() is added.
DrawRangeElementsBaseVertex() is added.
For DrawRangeElementsBaseVertex, index values are compared to
start and end values prior to adding basevertex.
MultiDrawElementsBaseVertex() is added.
When the *BaseVertex drawing commands are used with an indices
buffer having <32-bit width, the addition of a basevertex
should occur as though upconverted to 32-bit.
When the *BaseVertex drawing commands are used, basevertex is
implicitly added to each index in the indices buffer.
When the *BaseVertex drawing commands are used, the operation is
undefined if adding the offset would cause a negative index.
If depth clamping is enabled (DEPTH_CLAMP), the -wc <= zc <=
wc plane equation is ignored by view volume clipping.
If depth clamping is enabled, the incoming fragment's zw is
clamped to the range [min(n, f), max(n, f)] before the depth
buffer test is performed.
In transformation state (table 6.8), DEPTH_CLAMP is added.
The specification of gl_FragCoord is expanded to account for
pixel-center and origin conventions.
All redeclarations of gl_FragCoord must use the same set of
qualifiers.
Fragment shaders can have an input layout only for redeclaring
gl_FragCoord.
If gl_FragCoord is redeclared in any fragment shader compilation
unit, it must be redeclared in all fragment shader compilation
units that have a static use of gl_FragCoord.
Redeclaring gl_FragCoord does not affect rasterization,
transformation, or any other part of the OpenGL pipeline or
language features.
Redeclaring gl_FragCoord in any shader other than a fragment
shader is illegal.
The layout qualifier identifiers for gl_FragCoord are
"origin_upper_left" and "pixel_center_integer".
Within a fragment shader compilation unit, the first redeclartion
of gl_FragCoord (if any) must appear before the first use of
gl_FragCoord.
gl_FragCoord may be redeclared as "layout(origin_upper_left) in
vec4 gl_FragCoord;", causing (0.5, 0.5) to be used for the upper
left pixel of the window.
gl_FragCoord may be redeclared as "layout(origin_upper_left,
pixel_center_integer) in vec4 gl_FragCoord;", causing (0.0, 0.0)
to be used for the upper left pixel of the window.
gl_FragCoord may be redeclared as "layout(pixel_center_integer) in
vec4 gl_FragCoord;", causing (0.0, 0.0) to be used for the lower
left pixel of the window.
gl_FragCoord may be redeclared in a way that changes nothing
(i.e. "in vec4 gl_FragCoord;"), causing (0.5, 0.5) to be used for
the lower left pixel of the window.
Linking will now fail if a geometry shader fails to specify input
primitive type, output primitive type, or maximum output vertex
count.
Linking will now fail if input primitive type, output primitive
type, or maximum output vertex count is specified differently in
multiple geometry shader objects.
Linking will now fail if there is a geometry shader but no vertex
shader.
GetActiveUniformBlockiv() now accepts a pname of
UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER.
GetIntegerv() now accepts MAX_GEOMETRY_UNIFORM_BLOCKS.
MAX_VARYING_COMPONENTS now only applies when linking a program
containing only a vertex and fragment shader.
The maximum number of components of varying and special variables
that can be written by the vertex shader is
MAX_VERTEX_OUTPUT_COMPONENTS.
When a geometry shader is active, transform feedback records
geometry shader outputs.
Geometry shaders handle incomplete textures in the same way as
vertex shaders.
If a geometry shader is active, vertices processed by the vertex
shader are passed to the geometry shader.
Shader-only texturing is now available to geometry shaders.
The constant MAX_GEOMETRY_TEXTURE_UNITS is added.
A program object that includes a geometry shader must also include
a vertex shader.
The geometry shader pipeline stage is after primitive assembly,
prior to transform feedback.
Geometry shaders with input type "lines" may only be used with the
GL_LINES, GL_LINE_STRIP, and GL_LINE_LOOP primitive types.
Geometry shaders with input type "lines_adjacency" may only be
used with the GL_LINES_ADJACENCY and GL_LINE_STRIP_ADJACENCY
primitive types.
Geometry shaders with input type "points" may only be used with
the GL_POINTS primitive type.
Geometry shaders with input type "triangles" may only be used with
the GL_TRIANGLES, GL_TRIANGLE_STRIP, and GL_TRIANGLE_FAN primitive
types.
Geometry shaders with input type "triangles_adjacency" may only be
used with the GL_TRIANGLES_ADJACENCY and
GL_TRIANGLE_STRIP_ADJACENCY primitive types.
It is a link error if multiple geometry shader objects specify
different input primitive types.
It is a link error if no geometry shader object specifies an input
primitive type.
It is a link error, not a compile error, for a geometry shader to
access more input vertices than are available for the input
primitive type, since the input primitive type is not part of the
shader object (probably incorrect--seems like this is only true of
ARB_geometry_shader4).
The input primitive type may be queried using
GetProgramiv(GEOMETRY_INPUT_TYPE).
If the number of vertices emitted by the geometry shader is not
sufficient to produce a single primitive, nothing is drawn.
It is a link error if multiple geometry shader objects specify
different output primitive types or maximum output vertex counts.
It is a link error if no geometry shader object specifies an
output primitive type or maximum output vertex count.
The maximum number of output vertices can be queried using
GetProgramiv(GEOMETRY_VERTICES_OUT).
The output primitve type can be queried using
GetProgramiv(GEOMETRY_OUTPUT_TYPE)
MAX_GEOMETRY_UNIFORM_COMPONENTS is added.
For triangles drawn in point or line mode, gl_PrimitiveIDIn is
incremented only once per triangle, even though multiple
points/lines may eventually be drawn.
GEOMTERY_VERTICES_OUT may not exceed MAX_GEOMETRY_OUTPUT_VERTICES.
If a drawing operation is performed while a geometry shader is
active, and the primitive mode is incompatible with the geometry
shader's input primitive type, INVALID_OPERATION will result and
nothing will be drawn.
If a geometry shader outputs more than its declared maximum number
of output vertices, then the emitted vertices *may* have no
effect.
MAX_GEOMETRY_INPUT_COMPONENTS is added.
MAX_GEOMETRY_OUTPUT_COMPONENTS is added.
Restarting a primitive topology using the primitive restart index
has no effect on the primitive ID counter.
The product of the total number of vertices and the sum of all
components of all active varying variables may not exceed
MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS.
Writing to gl_Position from either the vertex or geometry shader
is optional.
gl_in[] receives values from built-in output variables written by
the vertex shader.
For the purpose of error checking the primitiveMode parameter of
BeginTransformFeedback(), if a geometry shader is present, its
output primitive type is used instead of the mode parameter passed
to drawing commands.
Transform feedback occurs after geometry shading.
If a geometry shader is active, PRIMITIVES_GENERATED counts the
number of primitives it emits.
Table 2.12 describes the behaviour of the provoking vertex for all
primitive types, including the new "adjacency" types.
Geometry shading is added to the pipeline.
"Line Strips with Adjacency" is added.
"Lines with Adjacency" is added.
"Triangle Strips with Adjacency" is added.
"Triangles with Adjacency" is added.
In "Line Strips with Adjacency" mode, if the number of vertices is
less than 4, all vertices are ignored.
In "Line Strips with Adjacency" mode, if there is no geometry
shader, adjacent vertices are ignored.
In "Line Strips with Adjacency" mode, line segments are drawn
between vertex i+2 and i+3 (i counts from 0 to n-1, vertices count
from 1 to n+3).
In "Lines with Adjacency" mode, if the number of vertices is 4n+k
and k != 0, the final k vertices are ignored.
In "Lines with Adjacency" mode, if there is no geometry shader,
adjacent vertices are ignored.
In "Lines with Adjacency" mode, line segments are drawn between
vertex 4*i+2 and 4*i+3 (i counts from 0 to n-1, vertices count
from 1 to 4n+k).
In "Triangle Strips with Adjacency" mode, if the number of
vertices is 2(n+2)+k and k == 1, the final vertex is ignored.
In "Triangle Strips with Adjacency" mode, if there is no geometry
shader, adjacent vertices are ignored.
In "Triangle Strips with Adjacency" mode, n triangles are drawn
when there are 2(n+2)+k vertices (the exact set of triangles drawn
is specified in table 2.4).
In "Triangles with Adjacency" mode, if the number of vertices is
6n+k and k != 0, the final k verties are ignored.
In "Triangles with Adjacency" mode, if there is no geometry
shader, adjacent vertices are ignored.
In "Triangles with Adjacency" mode, triangles are drawn using
vertex 6*i+1, 6*i+3, and 6*i+5 (i counts from 0 to n-1, vertices
count from 1 to 6n+k).
PROGRAM_POINT_SIZE has been changed to VERTEX_PROGRAM_POINT_SIZE.
If a geometry shader is active, gl_PrimitiveID contains the value
emitted by the geometry shader for the provoking vertex.
MAX_FRAGMENT_INPUT_COMPONENTS is added.
GetProgramiv() generates an INVALID_OPERATION error if it is
passed GEOMETRY_VERTICES_OUT, GEOMETRY_INPUT_TYPE, or
GEOMETRY_OUTPUT_TYPE for a program which has not been linked
successfully or which does not contain a geometry shader.
GetProgramiv() may now be passed GEOMETRY_INPUT_TYPE.
GetProgramiv() may now be passed GEOMETRY_OUTPUT_TYPE.
GetProgramiv() may now be passed GEOMETRY_VERTICES_OUT.
GetShaderiv() may now return GEOMETRY_SHADER if pname is
SHADER_TYPE.
Implementation dependent geometry shader limits (table 6.42) is
new.
In implementation dependent aggregate shader limits (table 6.44),
MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS is added.
In implementation dependent aggregate shader limits (table 6.44),
MAX_COMBINED_TEXTURE_IMAGE_UNITS has increased from 32 to 48.
In implementation dependent aggregate shader limits (table 6.44),
MAX_COMBINED_UNIFORM_BLOCKS has increased from 24 to 36.
In implementation dependent aggregate shader limits (table 6.44),
MAX_UNIFORM_BUFFER_BINDINGS has increased from 24 to 36.
In implementation dependent fragment processing limits (table
6.43), MAX_FRAGMENT_INPUT_COMPONENTS is new.
In implementation dependent vertex shader limits (table 6.41),
MAX_VERTEX_OUTPUT_COMPONENTS is new.
In program object state (table 6.29), GEOMETRY_VERTICES_OUT,
GEOMETRY_INPUT_TYPE, and GEOMETRY_OUTPUT_TYPE are added.
In program object state (table 6.31),
UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER is added.
In program object state (table 6.32), VERTEX_PROGRAM_POINT_SIZE
changes to PROGRAM_POINT_SIZE.
In shader object state (table 6.25), SHADER_TYPE is now Z3
(previously was Z2).
In texture environment and generation (table 6.17), ACTIVE_TEXTURE
is now Z48* (previously was Z32*).
In textures (table 6.13-6.14), TEXTURE_BINDING_xD,
TEXTURE_BINDING_1D_ARRAY, TEXTURE_BINDING_2D_ARRAY,
TEXTURE_BINDING_RECTANGLE, TEXTURE_BINDING_BUFFER, and
TEXTURE_BINDING_CUBE_MAP are now replicated by 48 instead of 32.
Note: MAX_FRAGMENT_INPUT_COMPONENTS is 128 (double the old value
of MAX_VARYING_COMPONENTS).
Note: MAX_GEOMETRY_OUTPUT_COMPONENTS is 128 (double the old value
of MAX_VARYING_COMPONENTS).
MAX_VARYING_COMPONENTS and MAX_VARYING_FLOATS are deprecated
Geometry shaders are added.
Vertex shaders no longer need to compute the homogeneous position
of the incoming vertex.
The qualifiers "smooth", "flat", and "noperspective" are no longer
limited just to vertex shader outs and fragment shader ins.
Each geometry shader input (or input block) needs to be declared
as an array.
Each geometry shader input array can optionally have a size
declared.
For the vertex/geometry interface, if the vertex output is an
array, it must appear in an output block (2D arrays are not
supported).
For the vertex/geometry interface, variables of the same name must
match in type and qualification (except that geometry variable
must be an array, and vertex variable must not).
Geometry shader inputs receive values from vertex outputs.
If a geometry shader input array does not have a size provided,
the array size will be set by the input layout declaration(s)
establishing the type of input primitive.
If a geometry shader input array has a size provided, it must be
consistent with the input layout declaration(s) establishing the
type of input primitive.
If a program contains vertex and fragment shaders but no geometry
shader, then there is a vertex/fragment interface (as in GLSL
1.40).
Integral fragment shader inputs must be qualified with "flat".
Integral vertex shader inputs need no longer be qualified with
"flat".
Layout qualifiers can appear with just an interface qualifier
("in", "out", or "uniform").
All geometry shader input unsized array declarations will be sized
by an *earlier* input layout qualifier (when present) according
to: points=1, lines=2, lines_adjacency=4, triangles=3,
triangles_adjacency=6.
All input layouts specified in geometry shader compilation units
must declare the same layout.
At least one compilation unit in a geometry shader must declare an
input layout.
For geometry shader inputs declared without an array size
(including gl_in), a layout must be declared before any array use
requiring the size be known (e.g. use of the length() method).
Geometry shaders allow input layout qualifiers *only* on the
interface qualifier "in" (i.e. "layout(...) in;").
If a geometry shader input is declared with an array size, it must
match the length implied by the geometry shader input layout.
It is a link-time error if not all geometry shader input sizes
match (including both declared array sizes and the length implied
by the geometry shader input layout).
Not all geometry shader compilation units need to declare an input
layout.
Only one layout qualifier identifier may appear for geometry
shader inputs.
The intrinsically declared geometry shader input array gl_in[]
will be sized by any input layout declaration.
The layout qualifier identifiers for geometry shader inputs are
"points", "lines", "lines_adjacency", "triangles", and
"triangles_adjacency".
All geometry shader output layout declarations in a program must
declare the same layout and the same value for max_vertices.
Geometry shaders can have output layout qualifiers *only* on the
interface qualifier "out" (i.e. "layout(...) out;").
If one declaration declares both primitive type and max_vertices,
order is irrelevant.
It is an error if max_vertices is declared to be a value greater
than gl_MaxGeometryOutputVertices.
Not all geometry shader compilation units need to declare an
output layout declaration.
One declaration can declare either a primitive type (points,
line_strip, or triangle_strip), or max_vertices, or both.
The geometry shader output layout qualifier "max_vertices =
<integer-constant>" is used to declare the maximum number of
vertices the shader will ever emit in a single execution.
The geometry shader output layout qualifiers of "points",
"line_strip", or "triangle_strip" are used to declare the
primitive type used for geometry shader output.
There must be at least one geometry output layout declaration
somewhere in a program.
The variables gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor,
and gl_BackSecondaryColor can now be redeclared in geometry
shaders (previously they were only allowed to be redeclared in
vertex shaders).
The default precision qualifiers that were previously predeclared
for vertex shaders now apply to geometry shaders as well.
The built-in macro GL_FRAGMENT_PRECISION_HIGH, which was
previously defined to 1 in vertex and fragment shaders, is now
available in geometry shaders as well.
Fragment shaders will select the value of gl_PrimitiveID that is
written by the geometry shader for the provoking vertex.
Geometry shaders also contain the special input variable "in int
gl_PrimitiveIDIn", which is filled with the number of primitives
processed by the geometry shader since the current set of
rendering primitives was started.
Geometry shaders also contain the special output variable "out int
gl_PrimitiveID", which is communicated to fragment shaders.
If a geometry shader fails to write to gl_PrimitiveID, the value
of gl_PrimitiveID within the fragment shader is undefined.
If the geometry shader does not write gl_Position before its first
call to EmitVertex(), or between calls to EmitVertex(), its value
is undefined.
If the vertex shader does not write gl_Position, its value is
undefined.
The gl_PerVertex interface block also appears as a geometry shader
input interface block, having block-name gl_PerVertex,
instance_name gl_in, and an implicit array size.
The gl_PerVertex interface block also appears as a geometry shader
output interface block, declared identically to the gl_PerVertex
vertex shader output interface block.
gl_ClipVertex is also added to the gl_PerVertex output and input
interface blocks in the geometry shader.
If a geometry shader is present, the value in gl_PrimitiveID comes
from the geometry shader's gl_PrimitiveID output.
If no geometry shader is present, the value in gl_PrimitiveID is
the number of primitives processed by the vertex shader since the
current set of rendering primitives was started.
The built-in input variable "in int gl_PrimitiveID" is added.
gl_ClipDistance must be sized either implicitly or explicitly to
the same size in all shaders (previously the size needed to match
between vertex and fragment shaders).
The built-in constants in this section are also provided to
geometry shaders (previously they were available only to vertex
and fragment shaders).
gl_MaxFragmentInputComponents (min: 128) is added.
gl_MaxGeometryInputComponents (min: 64) is added.
gl_MaxGeometryOutputComponents (min: 128) is added.
gl_MaxGeometryOutputVertices (min: 256) is added.
gl_MaxGeometryTextureInputUnits (min: 16) is added.
gl_MaxGeometryTotalOutputComponents (min: 1024) is added.
gl_MaxGeometryUniformComponents (min: 1024) is added.
gl_MaxGeometryVaryingComponents (min: 64) is added.
gl_MaxVertexOutputComponents (min: 64) is added.
These variables are also added to the gl_PerVertex output and
input interface blocks in the geometry shader (in the
compatibility profile only).
EmitVertex() is added. This emits the current values of output
variables to the current output primitive.
EndPrimitive() is added. This completes the current output
primitive and starts a new one, without emitting any vertices.
EndPrimitive() is optional when the output layout is "points".
If a geometry shader calls EmitVertex() more times than it has
declared with max_vertices, the results are undefined.
It is not necessary to call EndPrimitive() if the geometry shader
writes only a single primitive.
On return from EmitVertex(), the values of output variables are
undefined.
When a geometry shader terminates, the current output primitive is
automatically completed.
Texture lookup functions are now available to geometry shaders.
Noise functions are now available to geometry shaders.
"layout_list" is renamed to "layout_qualifier_id_list", and rules
are reworked so that it is a list of comma-separated
layout_qualifier_id's instead of a list of comma-separated
IDENTIFIER's.
"layout_qualifier_id" has two rules: IDENTIFIER (to match previous
behvaiour), and IDENTIFIER EQUAL INTCONSTANT.
New rule for "struct_declarator": IDENTIFIER LEFT_BRACKET
RIGHT_BRACKET.
Implementations are now required to support both GLSL versions
1.40 and 1.50 (previously only version 1.30 was required).
__VERSION__ should substitute 150.
GLSL 1.40 and GLSL 1.50 shaders may be linked together.
It is permissible for an input and an output to have the same name
provided that one of them is nested inside an interface block with
an instance name.
Outputs can also appear in interface blocks.
"Attribute" and "varying" qualifiers may not be used in interface
blocks.
A block-name is allowed to have different definitions in different
interfaces (e.g. same block name used as both an input and an
output block, I think)
All input and output block arrays except geometry shader inputs
must specify an array size.
An output block of one pipeline stage will be matched to an input
block with the same block-name (block-name is the name that
appears before the "{" that opens the interface block).
Arrays of built-in types or structures can be used within an
interface block.
Block names may not be used at global scope for anythin other than
as a block name.
Built-in types can be used within an interface block.
For blocks declared as arrays, the array index must be included
when accessing a member of a specific block, and must be omitted
when querying a characteristic such as the offset of the member
within the block.
For interface blocks that are declared as arrays, in order to
match, their array sizes must match (exception: between VS and GS,
rules are different).
For uniform blocks, the application uses the block name to
identify the block.
If an interface block has an instance-name, names inside the block
are in a scope with their own name space, accessed with "." (like
structures).
If an interface block has an instance-name, then members of the
block are accessed from the OpenGL API by the *block-name*,
followed by ".", followed by the name of the member.
If an interface block has no instance-name (the optional name that
appears after the "}") the names inside the block are scoped at
the global level for purposes of access from within the shader.
If an interface block has no instance-name, then members of the
block are accessed from the OpenGL API by their bare name.
In order for interface blocks to match, their contents must be in
identical order.
In order for interface blocks to match, their contents must
contain identical types, names, and member-wise layout
qualification.
Indices used to index a uniform block array must be integral
constant expressions.
Input variables may only appear in input blocks.
Input, output, and uniform variable declarations can be grouped
into named interface blocks.
Interface blocks can have an optional instance name (used to refer
to them within the shader).
Interpolation and storage qualifiers may appear within an
interface block.
It is illegal to have an input block in a vertex shader.
It is illegal to have an output block in a fragment shader.
Output blocks in one stage are matched up to input blocks in the
subsequent stage.
Output variables may only appear in output blocks.
Previously declared structures can be used within an interface
block.
Repeating the "in", "out", or "uniform" interface qualifier for a
member within a block is optional.
Structure definitions cannot be nested inside an interface block.
Uniform block array declarations must specify an array size.
Uniform variables may only appear in uniform blocks.
Within interface blocks, initializers are not allowed.
Within interface blocks, sampler types are not allowed.
Layout qualifiers can appear as part of an interface block
definition.
Layout qualifiers can appear as part of an interface block member.
Input or output instance names on blocks are not used when
redeclaring built-in variables. So for example, when
gl_FrontColor is redeclared as an input to the geometry shader, it
is redeclared as e.g. "flat in vec4 gl_FrontColor". No "gl_in[]"
is used.
The output variables gl_Position, gl_PointSize, and
gl_ClipDistance are now considered to be nested within an
interface block having block-name gl_PerVertex and no
instance-name.
The vertex shader output variable gl_ClipVertex is now considered
to be nested within the gl_PerVertex output interface block.
Redeclaration of gl_TexCoord is done at global scope, not in an
interface block.
The variables gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor,
gl_BackSecondaryColor, gl_TexCoord[], and gl_FogFragCoord are now
considered to be nested within the gl_PerVertex output interface
block (in the compatibility profile only).
New rule for "declaration": type_qualifier IDENTIFIER LEFT_BRACE
struct_declaration_list RIGHT_BRACE IDENTIFIER LEFT_BRACKET
RIGHT_BRACKET SEMICOLON
New rule for "declaration": type_qualifier IDENTIFIER LEFT_BRACE
struct_declaration_list RIGHT_BRACE IDENTIFIER LEFT_BRACKET
constant_expression RIGHT_BRACKET SEMICOLON
New rule for "declaration": type_qualifier IDENTIFIER LEFT_BRACE
struct_declaration_list RIGHT_BRACE IDENTIFIER SEMICOLON
Layered rendering requires the use of framebuffer objects.
Through layered rendering, geometry shaders may render primitives
to arbitrary layers of a cube-map texture, 3D texture, or 1D or 2D
texture array.
Blit operations: If both read and draw framebuffers are layered,
the blit operation is still performed only on layer zero.
Blit operations: If the draw framebuffer is layered, pixel values
are written to layer zero.
Blit operations: If the read framebuffer is layered, pixel values
are read from layer zero.
If the number of layers of each attachment are not all identical,
rendering will be limited to the smallest number of layers of any
attachment.
FRAMEBUFFER_ATTACHMENT_LAYERED is set to TRUE if
FramebufferTexture is called and texture is the name of a
three-dimensional, cube map, two-dimensional multisample array, or
one- or two-dimensional array texture. Otherwise it is set to
FALSE.
FramebufferTexture() generates INVALID_OPERATION for buffer
textures.
FramebufferTexture() is added.
If FramebufferTexture() is supplied a three-dimensional texture,
cube map texture, one- or two-dimensional array texture, or
two-dimensional multisample array texture, the entire texture
level is attached as a layered framebuffer attachment.
If a texture of zero is passed to any FramebufferTexture*
function, additional parameters (level, textarget, and/or layer)
are ignored, and state values are set to their default values.
The set of framebuffer-attachable images is clarified. I *think*
the only thing that's new is the ability to attach an entire level
of a three-dimensional texture, cube map texture, or one- or
two-dimensional array texture, creating a layered attachment
point.
If any framebuffer attachment is layered, all popelated color
attachments must be from textures of the same target
(FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS).
If any framebuffer attachment is layered, all popuated attachments
must be layered (FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS).
A framebuffer is layered if it is complete and all of its
populated attachments are layered.
A layer number written by a geometry shader has no effect if the
framebuffer is not layered.
Clear() clears all layers.
ClearBuffer() clears all layers.
Commands such as ReadPixels() always read from layer zero.
If a layer number is out of range (negative or greater than the
number of layers of any attachment), the effect is undefined.
If there is a geometry shader and it statically assigns to
gl_Layer, then all fragments are assigned a layer based on this
value.
Table 4.12 establishes a mapping between layer number and cube map
face.
The layer number selects an image for use by stencil test, depth
buffer test, blending, and color buffer writes.
The vertex used to determine the layer is
implementation-dependent.
When the current geometry shader does not statically assign a
value to gl_Layer, all fragments are assigned a layer of zero.
When there is no geometry shader, all fragments are assigned layer
of zero.
GetFramebufferAttachmentParameteriv() may now be passed
FRAMEBUFFER_ATTACHMENT_LAYERED.
In framebuffer (table 6.23), FRAMEBUFFER_ATTACHMENT_LAYERED is
added.
Geometry shaders also contain the special output variable "out int
gl_Layer".
If a geometry shader statically assigns a value to gl_Layer in
some execution paths but not others, then layered rendering mode
is still enabled, and gl_Layer is undefined in those execution
paths where no value was assigned.
If a geometry shader statically assigns a value to gl_Layer,
layered rendering mode is enabled.
The geometry shader output gl_Layer is used to select a layer of a
multi-layer framebuffer attachment.
The value of gl_Layer which is used for rendering comes from one
of the vertices of the primitive being shaded; which vertex it
comes from is undefined.
GetIntegerv() may be passed CONTEXT_PROFILE_MASK; it returns
either CONTEXT_CORE_PROFILE_BIT or
CONTEXT_COMPATIBILITY_PROFILE_BIT depending on the API implemented
by the context.
All implementations must support the core profile.
After "#version <number>" there is an optional profile.
If no profile argument is provided, the default is "core".
In both core and compatibility profiles, GL_core_profile is
#defined to 1.
In the compatibility profile, GL_compatibility_profile is #defined
to 1.
The optional profile may be either "core" or "compatibility".
Flatshading is added to the list of operations applied to vertices
processed by the vertex shader.
Transform feedback occurs before flatshading.
Flatshading selects the varying output corresponding to the
provoking vertex of the primitive.
The initial value of the provoking vertex mode is
LAST_VERTEX_CONVENTION.
The provoking vertex is controlled by the ProvokingVertex()
command.
In coloring (table 6.9), PROVOKING_VERTEX is added.
In implementation dependent values (table 6.45),
QUADS_FOLLOW_PROVOKING_VERTEX is new.
Initially, seamless cube map filtering is disabled.
Seamless Cube Map Filtering is added.
When seamless cube map filtering is enabled, if LINEAR filtering
is done within a miplevel, wrap mode CLAMP_TO_BORDER is used.
When seamless cube map filtering is enabled, if NEAREST filtering
is done within a miplevel, wrap mode CLAMP_TO_EDGE is used.
When seamless cube map filtering is enabled, if a texture sample
location would lie in the texture border in both u and v
(i.e. sampling at a corner), if the corresponding corner samples
of the three faces meeting at the corner all have the same value,
then that value is required to be selected.
When seamless cube map filtering is enabled, if a texture sample
location would lie in the texture border in both u and v
(i.e. sampling at a corner), the *recommended* method is to
average the values of the corresponding corner samples of the
three faces meeting at the corner.
When seamless cube map filtering is enabled, if a texture sample
location would lie in the texture border in either u or v, instead
select the corresponding texel from the appropriate neighboring
face.
When seamless cube map filtering is enabled, texture wrap modes
are ignored.
In miscellaneous (table 6.47), TEXTURE_CUBE_MAP_SEAMLESS is added.
Fragment shader inputs may be structures.
Vertex and geometry shader outputs may be structures.
The "GL Data Types" table is expanded to include "sync".
DeleteSync() deletes sync objects.
DeleteSync() does not block on a sync object that is not yet
SIGNALED.
DeleteSync() generates INVALID_VALUE if the supplied sync
parameter is neither zero nor the name of a sync object.
DeleteSync() may be called on a sync object that currently has
ClientWaitSync() or WaitSync() commands blocking on it.
DeleteSync() siglently ignores sync values of zero.
FenceSync() creates a new fence sync object, inserts a fence
command in the GL command stream, and associates it with the sync
object.
Sync objects are initially UNSIGNALED.
Sync objects have a SYNC_CONDITION property which is the condition
passed to FenceSync().
Sync objects have a SYNC_FLAGS property which is the flags value
passed to FenceSync().
Sync objects have a SYNC_STATUS property with two possible states:
SIGNALED and UNSIGNALED.
Sync objects have an OBJECT_TYPE property which is always
SYNC_FENCE.
The only condition allowed by FenceSync is
SYNC_GPU_COMMANDS_COMPLETE (otherwise an INVALID_ENUM error is
generated).
The only flags value allowed by FenceSync is 0 (otherwise an
INVALID_VALUE error is generated).
When all proceeding commands from the same command stream have
been fully realized on both the client and the server, the sync
object becomes signaled.
A single sync object can be blocked in multiple GL contexts.
A single sync object can block both client and server.
ClientWaitSync() blocks waiting until a sync object is signaled,
or a timeout expires.
ClientWaitSync() generates INVALID_VALUE if flags contains any
bits other than SYNC_FLUSH_COMMANDS_BIT.
ClientWaitSync() generates INVALID_VALUE if sync is not the name
of a sync object.
ClientWaitSync() returns ALREADY_SIGNALED if sync was already
signaled.
ClientWaitSync() returns CONDITION_SATISFIED if sync became
signaled while the ClientWaitSync() call was in effect.
ClientWaitSync() returns TIMEOUT_EXPIRED if timeout occurred
before sync was signaled.
ClientWaitSync() returns WAIT_FAILED without blocking if there is
an error (and also generates a GL error).
ClientWaitSync() will return ALREADY_SIGNALED on an
already-signaled sync object even if timeout was zero.
If an error occurs, WaitSync() does not block.
If timeout is zero, ClientWaitSync() tests the current state of
sync.
The GL command stream may contain multiple WaitSync() commands on
the same sync object. When sync object becomes signaled, any
queued WaitSync() commands for the same object become no-ops.
Timeout is in nanoseconds.
Timeout may be larger than requested due to
implementation-dependent timeout accuracy restrictions.
WaitSync() generates INVALID_VALUE if sync is not the name of a
sync object.
WaitSync() may only be passed a flags value of 0 (INVALID_VALUE is
generated otherwise).
WaitSync() may only be passed a timeout value of TIMEOUT_IGNORED
(INVALID_VALUE is generated otherwise).
WaitSync() returns immediately, but causes the GL server to block
until sync is signaled.
WaitSync() will wait no longer than MAX_SERVER_WAIT_TIMEOUT.
If SYNC_FLUSH_COMMANDS_BIT was not passed to ClientWaitSync(),
then ClientWaitSync() may hang forever.
If SYNC_FLUSH_COMMANDS_BIT was passed to ClientWaitSync(), then it
performs the equivalent of glFlush() before blocking on the sync
object.
If a sync object is marked for deletion while client or server is
blocking on it, deletion is deferred until nothing is blocking on
it.
SYNC_FLUSH_COMMANDS_BIT will not help when waiting for a fence
command issued in another context's command stream.
If GetSynciv() is passed an invalid pname, INVALID_ENUM is
generated.
If sync is not the name of a sync object GetSynciv() generates
INVALID_VALUE.
IsSync() returns true if sync is the name of a sync object.
Properties of a sync object may be queried with GetSynciv().
Sync object names immediately become invalid after calling
DeleteSync(), even if the underlying sync object is still
associated with a fence command or blocking a *WaitSync command.
In implementation dependent values (table 6.45),
MAX_SERVER_WAIT_TIMEOUT is new.
Sync (table 6.35) is new.
Sync objects are added to the list of objects that can be shared
between contexts.
Multiple GL clients and/or servers can be blocked on a single sync
object.
When multiple GL clients and/or servers are blocked on a single
sync object, the order in which blocks are released is
implementation-dependent.
In addition to Finish(), FenceSync() may be used to determine when
completion of a command has occurred.
Table 2.10 adds new tokens for use by GetActiveUniform() and
GetActiveUniformsiv(): SAMPLER_2D_MULTISAMPLE,
SAMPLER_2D_MULTISAMPLE_ARRAY, INT_SAMPLER_2D_MULTISAMPLE,
INT_SAMPLER_2D_MULTISAMPLE_ARRAY,
UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE, and
UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY.
Multisample texel fetches are added.
Multisample texel fetches have no LOD parameter.
Multisample texel fetches may only be performed on multisample
texture samplers.
Multisample textures support only NEAREST filtering.
Sample locations can now be queried with GetMultisamplefv().
Two-dimensional multisample and two-dimensional multisample array
textures are added.
For rectangular and multisample textures, levelbase is always
zero.
Multisample textures contain a boolean indicating whether
identical sample locations and the same number of samples will be
used for all texels in the image.
Multisample textures contain an integer identifying the number of
samples in each texel.
Command TexImage2DMultisample() is added.
Command TexImage3DMultisample() is added.
For TexImage2DMultisample(), target must be TEXTURE_2D_MULTISAMPLE
or PROXY_TEXTURE_2D_MULTISAMPLE.
For TexImage3DMultisample(), target must be
TeXTURE_2D_MULTISAMPLE_ARRAY or
PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY.
If fixedsamplelocations=TRUE is provided to
TexImage2DMultisample() or TexImage3DMultisample(), then the
sample locations will depend on neither coordinate,
internalformat, nor image size.
MAX_COLOR_TEXTURE_SAMPLES is added.
MAX_DEPTH_TEXTURE_SAMPLES is added.
MAX_INTEGER_SAMPLES is added.
If SAMPLE_MASK is enabled, the fragment coverage is ANDed with
SAMPLE_MASK_VALUE.
MAX_SAMPLE_MASK_WORDS specifies how many 32-bit masks
SAMPLE_MASK_VALUE is separated into.
SAMPLE_MASK and SAMPLE_MASK_VALUE are added.
SAMPLE_MASK_VALUE is queried using
GetIntegeri_v(SAMPLE_MASK_VALUE) with index set to maskNumber.
SAMPLE_MASK_VALUE is separated into n 32-bit masks (to handle the
possibility of >32x multisampling).
SAMPLE_MASK_VALUE is specified using SampleMaski().
FramebufferTexture2D may be used to bind one layer of a
TEXTURE_2D_MULTISAMPLE texture.
FramebufferTextureLayer may now be used on a two-dimensional
multisample array.
MAX_INTEGER_SAMPLES is added to allow the implementation to signal
the degree to which multisample integer renderbuffers are
supported.
When calling FramebufferTexture* commands with
TEXTURE_2D_MULTISAMPLE or TEXTURE_2D_MULTISAMPLE_ARRAY, level must
be zero.
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE now checks
TEXTURE_FIXED_SAMPLE_LOCATIONS.
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE now checks both
RENDERBUFFER_SAMPLES and TEXTURE_SAMPLES.
Renderbuffers effectively have a TEXTURE_FIXED_SAMPLE_LOCATIONS
value of TRUE for purposes of checking framebuffer completeness.
GetTexLevelParameter{if}v() may now be used with
TEXTURE_2D_MULTISAMPLE, TEXTURE_2D_MULTISAMPLE_ARRAY,
PROXY_TEXTURE_2D_MULTISAMPLE, or
PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY.
In framebuffer dependent values (table 6.46), SAMPLE_POSITION is
new.
In implementation dependent values (table 6.45),
MAX_SAMPLE_MASK_WORDS, MAX_COLOR_TEXTURE_SAMPLES,
MAX_DEPTH_TEXTURE_SAMPLES, and MAX_INTEGER_SAMPLES are new.
In multisampling (table 6.11), SAMPLE_MASK and SAMPLE_MASK_VALUE
are added.
In textures (table 6.14), TEXTURE_BINDING_2D_MULTISAMPLE and
TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY are added.
In textures (table 6.16), TEXTURE_SAMPLES and
TEXTURE_FIXED_SAMPLE_LOCATIONS are added.
The following keywords are added: sampler2DMS, isampler2DMS,
usampler2DMS, sampler2DMSArray, isampler2DMSArray,
usampler2DMSArray
The following basic data types are added: sampler2DMS,
sampler2DMSArray, isampler2DMS, isampler2DMSArray, usampler2DMS,
usampler2DMSArray
gvec4 texelFetch(gsampler2DMS sampler, ivec2 P, int sample) is
added.
gvec4 texelFetch(gsampler2DMSArray sampler, ivec3 P, int sample)
is added.
ivec2 textureSize(gsampler2DMS sampler) is added.
ivec2 textureSize(gsampler2DMSArray sampler) is added.
New rules for "type_specifier_nonarray": SAMPLER2DMS,
ISAMPLER2DMS, USAMPLER2DMS, SAMPLER2DMSArray, ISAMPLER2DMSArray,
and USAMPLER2DMSArray.
The following tokens are added: SAMPLER2DMS, ISAMPLER2DMS,
USAMPLER2DMS, SAMPLER2DMSArray, ISAMPLER2DMSArray,
USAMPLER2DMSArray.
Vertex shader inputs can now be arrays, but not structures.