OpenGL extension EXT.gpu_shader4
This module customises the behaviour of the
OpenGL.raw.GL.EXT.gpu_shader4 to provide a more
Overview (from the spec)
This extension provides a set of new features to the OpenGL Shading
Language and related APIs to support capabilities of new hardware. In
particular, this extension provides the following functionality:
* New texture lookup functions are provided that allow shaders to
access individual texels using integer coordinates referring to the
texel location and level of detail. No filtering is performed. These
functions allow applications to use textures as one-, two-, and
* New texture lookup functions are provided that allow shaders to query
the dimensions of a specific level-of-detail image of a texture
* New texture lookup functions variants are provided that allow shaders
to pass a constant integer vector used to offset the texel locations
used during the lookup to assist in custom texture filtering
* New texture lookup functions are provided that allow shaders to
access one- and two-dimensional array textures. The second, or third,
coordinate is used to select the layer of the array to access.
* New "Grad" texture lookup functions are provided that allow shaders
to explicitely pass in derivative values which are used by the GL to
compute the level-of-detail when performing a texture lookup.
* A new texture lookup function is provided to access a buffer texture.
* The existing absolute LOD texture lookup functions are no longer
restricted to the vertex shader only.
* The ability to specify and use cubemap textures with a
DEPTH_COMPONENT internal format. This also enables shadow mapping on
cubemaps. The 'q' coordinate is used as the reference value for
comparisons. A set of new texture lookup functions is provided to
lookup into shadow cubemaps.
* The ability to specify if varying variables are interpolated in a
non-perspective correct manner, if they are flat shaded or, if
multi-sampling, if centroid sampling should be performed.
* Full signed integer and unsigned integer support in the OpenGL
- Integers are defined as 32 bit values using two's complement.
- Unsigned integers and vectors thereof are added.
- New texture lookup functions are provided that return integer
values. These functions are to be used in conjunction with new
texture formats whose components are actual integers, rather
than integers that encode a floating-point value. To support
these lookup functions, new integer and unsigned-integer
sampler types are introduced.
- Integer bitwise operators are now enabled.
- Several built-in functions and operators now operate on
integers or vectors of integers.
- New vertex attribute functions are added that load integer
attribute data and can be referenced in a vertex shader as
- New uniform loading commands are added to load unsigned integer
- Varying variables can now be (unsigned) integers. If declared
as such, they have to be flat shaded.
- Fragment shaders can define their own output variables, and
declare them to be of type floating-point, integer or unsigned
integer. These variables are bound to a fragment color index
with the new API command BindFragDataLocationEXT(), and directed
to buffers using the existing DrawBuffer or DrawBuffers API
* Added new built-in functions truncate() and round() to the shading
* A new built-in variable accessible from within vertex shaders that
holds the index <i> implicitly passed to ArrayElement to specify the
vertex. This is called the vertex ID.
* A new built-in variable accessible from within fragment and geometry
shaders that hold the index of the currently processed
primitive. This is called the primitive ID.
This extension also briefly mentions a new shader type, called a geometry
shader. A geometry shader is run after vertices are transformed, but
before clipping. A geometry shader begins with a single primitive (point,
line, triangle. It can read the attributes of any of the vertices in the
primitive and use them to generate new primitives. A geometry shader has a
fixed output primitive type (point, line strip, or triangle strip) and
emits vertices to define a new primitive. Geometry shaders are discussed
in detail in the GL_EXT_geometry_shader4 specification.
The official definition of this extension is available here:
|EXTENSION_NAME = 'GL_EXT_gpu_shader4'|
GL_INT_SAMPLER_1D_ARRAY_EXT = GL_INT_SAMPLER_1D_ARRAY_EXT
GL_INT_SAMPLER_1D_EXT = GL_INT_SAMPLER_1D_EXT
GL_INT_SAMPLER_2D_ARRAY_EXT = GL_INT_SAMPLER_2D_ARRAY_EXT
GL_INT_SAMPLER_2D_EXT = GL_INT_SAMPLER_2D_EXT
GL_INT_SAMPLER_2D_RECT_EXT = GL_INT_SAMPLER_2D_RECT_EXT
GL_INT_SAMPLER_3D_EXT = GL_INT_SAMPLER_3D_EXT
GL_INT_SAMPLER_BUFFER_EXT = GL_INT_SAMPLER_BUFFER_EXT
GL_INT_SAMPLER_CUBE_EXT = GL_INT_SAMPLER_CUBE_EXT
GL_SAMPLER_1D_ARRAY_EXT = GL_SAMPLER_1D_ARRAY_EXT
GL_SAMPLER_1D_ARRAY_SHADOW_EXT = GL_SAMPLER_1D_ARRAY_SHADOW_EXT
GL_SAMPLER_2D_ARRAY_EXT = GL_SAMPLER_2D_ARRAY_EXT
GL_SAMPLER_2D_ARRAY_SHADOW_EXT = GL_SAMPLER_2D_ARRAY_SHADOW_EXT
GL_SAMPLER_BUFFER_EXT = GL_SAMPLER_BUFFER_EXT
GL_SAMPLER_CUBE_SHADOW_EXT = GL_SAMPLER_CUBE_SHADOW_EXT
GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT = GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT
GL_UNSIGNED_INT_SAMPLER_1D_EXT = GL_UNSIGNED_INT_SAMPLER_1D_EXT
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT = GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT
GL_UNSIGNED_INT_SAMPLER_2D_EXT = GL_UNSIGNED_INT_SAMPLER_2D_EXT
GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT = GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT
GL_UNSIGNED_INT_SAMPLER_3D_EXT = GL_UNSIGNED_INT_SAMPLER_3D_EXT
GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT = GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT
GL_UNSIGNED_INT_SAMPLER_CUBE_EXT = GL_UNSIGNED_INT_SAMPLER_CUBE_EXT
GL_UNSIGNED_INT_VEC2_EXT = GL_UNSIGNED_INT_VEC2_EXT
GL_UNSIGNED_INT_VEC3_EXT = GL_UNSIGNED_INT_VEC3_EXT
GL_UNSIGNED_INT_VEC4_EXT = GL_UNSIGNED_INT_VEC4_EXT
__file__ = '/home/mcfletch/pylive/OpenGL/GL/EXT/gpu_shader4.pyc'
__name__ = 'OpenGL.GL.EXT.gpu_shader4'
__package__ = 'OpenGL.GL.EXT'
glBindFragDataLocationEXT = <OpenGL.platform.baseplatform.glBindFragDataLocationEXT object at 0x76cd710>
glGetFragDataLocationEXT = <OpenGL.platform.baseplatform.glGetFragDataLocationEXT object at 0x76cdb50>
glGetUniformuivEXT = <OpenGL.platform.baseplatform.glGetUniformuivEXT object at 0x76caa90>
glUniform1uiEXT = <OpenGL.platform.baseplatform.glUniform1uiEXT object at 0x76cdbd0>
glUniform1uivEXT = <OpenGL.platform.baseplatform.glUniform1uivEXT object at 0x76cddd0>
glUniform2uiEXT = <OpenGL.platform.baseplatform.glUniform2uiEXT object at 0x76cdc50>
glUniform2uivEXT = <OpenGL.platform.baseplatform.glUniform2uivEXT object at 0x76cde50>
glUniform3uiEXT = <OpenGL.platform.baseplatform.glUniform3uiEXT object at 0x76cdcd0>
glUniform3uivEXT = <OpenGL.platform.baseplatform.glUniform3uivEXT object at 0x76cded0>
glUniform4uiEXT = <OpenGL.platform.baseplatform.glUniform4uiEXT object at 0x76cdd50>
glUniform4uivEXT = <OpenGL.platform.baseplatform.glUniform4uivEXT object at 0x76cdf50>