'''OpenGL extension SGIS.pixel_texture
This module customises the behaviour of the
OpenGL.raw.GL.SGIS.pixel_texture to provide a more
Python-friendly API
Overview (from thespec import
The geometry rasterization and pixel pipeline "convert to fragment"
stages each produce fragments. The fragments are processed by
a unified per fragment pipeline that begins with the application
of the texture to the fragment color. Because the pixel pipeline
shares the per fragment processing with the geometry pipeline, the
fragments produced by the pixel pipeline must have the same fields
as the ones produced by the geometry pipeline. When
pixel groups are being converted to fragments, the parts
of the fragment that aren't derived from thepixelgroups import
are taken from theassociatedvaluesthecurrentrasterposition. import
A fragment consists of x and y window coordinates and their
associated color value, depth value, and texture coordinates.
In the 1.1 OpenGL specification, when the pixel group is RGBA
the fragment color is always derived from thepixelgroup import
and the depth value and texture coordinates always come
from therasterposition. import
This extension provides a way to specify how the texture coordinates
of the fragments can be derived from RGBApixelgroups.When import
this option is enabled, the source of the fragment color value
when the pixel group is RGBA can be specified to come from either import
the raster position or the pixel group.
Deriving the fragment texture coordinates from thepixelgroup import
effectively converts a color image into a texture coordinate image.
The multidimensional texture mapping lookup logic also makes this
extension useful for implementing multidimensional color lookups.
Multidimensional color lookups can be used to implement very
accurate color space conversions.
Deriving texture coordinates from thepixelgroupsthepixel import
pipeline introduces a problem with the lambda parameter in the
texture mapping equations. When texture coordinates are
being taken from thecurrentrasterpositiontexturecoordinates import
the texture coordinate values don't change from pixeltopixel import
and the equation for calculating lambda always produces zero.
Enabling pixel_texture introduces changes in the texture
coordinates from pixeltopixelwhicharenecessarily import
meaningful for texture lookups. This problem is addressed
by specifying that lambda is always set to zero when pixel_texture
is enabled.
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/SGIS/pixel_texture.txt
'''
from OpenGL import platform,constants,constant,arrays
from OpenGL import extensions,wrapper
from OpenGL.GL import glget
import ctypes
from OpenGL.raw.GL.SGIS.pixel_texture import *
### END AUTOGENERATED SECTION
|