OpenGL.GL.shaders
index
/home/mcfletch/pylive/OpenGL/GL/shaders.py

Convenience module providing common shader entry points
 
The point of this module is to allow client code to use
OpenGL 2.x style names to reference shader-related operations
even if the local hardware only supports ARB extension-based 
shader rendering.
 
There are also two utility methods compileProgram and compileShader
which make it easy to create demos which are shader-using.

 
Modules
       
OpenGL.GL
OpenGL.GL.ARB.fragment_shader
logging
OpenGL.GL.ARB.vertex_program
OpenGL.GL.ARB.shader_objects
OpenGL.GL.ARB.vertex_program
OpenGL.GL.ARB.vertex_shader

 
Classes
       
int(object)
ShaderProgram

 
class ShaderProgram(int)
    Integer sub-class with context-manager operation
 
 
Method resolution order:
ShaderProgram
int
object

Methods defined here:
__enter__(self)
Start use of the program
__exit__(self, typ, val, tb)
Stop use of the program

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Methods inherited from int:
__abs__(...)
x.__abs__() <==> abs(x)
__add__(...)
x.__add__(y) <==> x+y
__and__(...)
x.__and__(y) <==> x&y
__cmp__(...)
x.__cmp__(y) <==> cmp(x,y)
__coerce__(...)
x.__coerce__(y) <==> coerce(x, y)
__div__(...)
x.__div__(y) <==> x/y
__divmod__(...)
x.__divmod__(y) <==> divmod(x, y)
__float__(...)
x.__float__() <==> float(x)
__floordiv__(...)
x.__floordiv__(y) <==> x//y
__format__(...)
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getnewargs__(...)
__hash__(...)
x.__hash__() <==> hash(x)
__hex__(...)
x.__hex__() <==> hex(x)
__index__(...)
x[y:z] <==> x[y.__index__():z.__index__()]
__int__(...)
x.__int__() <==> int(x)
__invert__(...)
x.__invert__() <==> ~x
__long__(...)
x.__long__() <==> long(x)
__lshift__(...)
x.__lshift__(y) <==> x<<y
__mod__(...)
x.__mod__(y) <==> x%y
__mul__(...)
x.__mul__(y) <==> x*y
__neg__(...)
x.__neg__() <==> -x
__nonzero__(...)
x.__nonzero__() <==> x != 0
__oct__(...)
x.__oct__() <==> oct(x)
__or__(...)
x.__or__(y) <==> x|y
__pos__(...)
x.__pos__() <==> +x
__pow__(...)
x.__pow__(y[, z]) <==> pow(x, y[, z])
__radd__(...)
x.__radd__(y) <==> y+x
__rand__(...)
x.__rand__(y) <==> y&x
__rdiv__(...)
x.__rdiv__(y) <==> y/x
__rdivmod__(...)
x.__rdivmod__(y) <==> divmod(y, x)
__repr__(...)
x.__repr__() <==> repr(x)
__rfloordiv__(...)
x.__rfloordiv__(y) <==> y//x
__rlshift__(...)
x.__rlshift__(y) <==> y<<x
__rmod__(...)
x.__rmod__(y) <==> y%x
__rmul__(...)
x.__rmul__(y) <==> y*x
__ror__(...)
x.__ror__(y) <==> y|x
__rpow__(...)
y.__rpow__(x[, z]) <==> pow(x, y[, z])
__rrshift__(...)
x.__rrshift__(y) <==> y>>x
__rshift__(...)
x.__rshift__(y) <==> x>>y
__rsub__(...)
x.__rsub__(y) <==> y-x
__rtruediv__(...)
x.__rtruediv__(y) <==> y/x
__rxor__(...)
x.__rxor__(y) <==> y^x
__str__(...)
x.__str__() <==> str(x)
__sub__(...)
x.__sub__(y) <==> x-y
__truediv__(...)
x.__truediv__(y) <==> x/y
__trunc__(...)
Truncating an Integral returns itself.
__xor__(...)
x.__xor__(y) <==> x^y
conjugate(...)
Returns self, the complex conjugate of any int.

Data descriptors inherited from int:
denominator
the denominator of a rational number in lowest terms
imag
the imaginary part of a complex number
numerator
the numerator of a rational number in lowest terms
real
the real part of a complex number

Data and other attributes inherited from int:
__new__ = <built-in method __new__ of type object at 0x817d80>
T.__new__(S, ...) -> a new object with type S, a subtype of T

 
Functions
       
_alt(base, name)
compileProgram(*shaders)
Create a new program, attach shaders and validate
 
shaders -- arbitrary number of shaders to attach to the 
    generated program.
 
This convenience function is *not* standard OpenGL,
but it does wind up being fairly useful for demos 
and the like.  You may wish to copy it to your code 
base to guard against PyOpenGL changes.
 
Usage:
 
    shader = compileProgram
        compileShader( source, GL_VERTEX_SHADER ),
        compileShader( source2, GL_FRAGMENT_SHADER ),
    )
    glUseProgram( shader )
 
Note:
    If (and only if) validation of the linked program 
    *passes* then the passed-in shader objects will be 
    deleted from the GL.
 
returns GLuint shader program reference
raises RuntimeError when a link/validation failure occurs
compileShader(source, shaderType)
Compile shader source of given type
 
source -- GLSL source-code for the shader
shaderType -- GLenum GL_VERTEX_SHADER, GL_FRAGMENT_SHADER, etc,
 
returns GLuint compiled shader reference
raises RuntimeError when a compilation failure occurs

 
Data
        GL_BOOL = GL_BOOL
GL_BOOL_VEC2 = GL_BOOL_VEC2
GL_BOOL_VEC3 = GL_BOOL_VEC3
GL_BOOL_VEC4 = GL_BOOL_VEC4
GL_COLOR_SUM = GL_COLOR_SUM
GL_COMPILE_STATUS = GL_COMPILE_STATUS
GL_CURRENT_VERTEX_ATTRIB = GL_CURRENT_VERTEX_ATTRIB
GL_FALSE = GL_FALSE
GL_FLOAT_MAT2 = GL_FLOAT_MAT2
GL_FLOAT_MAT3 = GL_FLOAT_MAT3
GL_FLOAT_MAT4 = GL_FLOAT_MAT4
GL_FLOAT_VEC2 = GL_FLOAT_VEC2
GL_FLOAT_VEC3 = GL_FLOAT_VEC3
GL_FLOAT_VEC4 = GL_FLOAT_VEC4
GL_FRAGMENT_SHADER = GL_FRAGMENT_SHADER
GL_FRAGMENT_SHADER_DERIVATIVE_HINT = GL_FRAGMENT_SHADER_DERIVATIVE_HINT
GL_INFO_LOG_LENGTH = GL_INFO_LOG_LENGTH
GL_INT_VEC2 = GL_INT_VEC2
GL_INT_VEC3 = GL_INT_VEC3
GL_INT_VEC4 = GL_INT_VEC4
GL_LINK_STATUS = GL_LINK_STATUS
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = GL_MAX_FRAGMENT_UNIFORM_COMPONENTS
GL_MAX_VARYING_FLOATS = GL_MAX_VARYING_FLOATS
GL_MAX_VERTEX_ATTRIBS = GL_MAX_VERTEX_ATTRIBS
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
GL_MAX_VERTEX_UNIFORM_COMPONENTS = GL_MAX_VERTEX_UNIFORM_COMPONENTS
GL_OBJECT_ACTIVE_UNIFORMS = GL_OBJECT_ACTIVE_UNIFORMS_ARB
GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH = GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB
GL_OBJECT_COMPILE_STATUS = GL_OBJECT_COMPILE_STATUS_ARB
GL_OBJECT_LINK_STATUS = GL_OBJECT_LINK_STATUS_ARB
GL_SAMPLER_1D = GL_SAMPLER_1D
GL_SAMPLER_1D_SHADOW = GL_SAMPLER_1D_SHADOW
GL_SAMPLER_2D = GL_SAMPLER_2D
GL_SAMPLER_2D_RECT = GL_SAMPLER_2D_RECT
GL_SAMPLER_2D_RECT_SHADOW = GL_SAMPLER_2D_RECT_SHADOW
GL_SAMPLER_2D_SHADOW = GL_SAMPLER_2D_SHADOW
GL_SAMPLER_3D = GL_SAMPLER_3D
GL_SAMPLER_CUBE = GL_SAMPLER_CUBE
GL_VALIDATE_STATUS = GL_VALIDATE_STATUS
GL_VERTEX_ATTRIB_ARRAY_ENABLED = GL_VERTEX_ATTRIB_ARRAY_ENABLED
GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = GL_VERTEX_ATTRIB_ARRAY_NORMALIZED
GL_VERTEX_ATTRIB_ARRAY_POINTER = GL_VERTEX_ATTRIB_ARRAY_POINTER
GL_VERTEX_ATTRIB_ARRAY_SIZE = GL_VERTEX_ATTRIB_ARRAY_SIZE
GL_VERTEX_ATTRIB_ARRAY_STRIDE = GL_VERTEX_ATTRIB_ARRAY_STRIDE
GL_VERTEX_ATTRIB_ARRAY_TYPE = GL_VERTEX_ATTRIB_ARRAY_TYPE
GL_VERTEX_PROGRAM_POINT_SIZE = GL_VERTEX_PROGRAM_POINT_SIZE
GL_VERTEX_PROGRAM_TWO_SIDE = GL_VERTEX_PROGRAM_TWO_SIDE
GL_VERTEX_SHADER = GL_VERTEX_SHADER
__all__ = ['glAttachShader', 'glDeleteShader', 'glGetProgramInfoLog', 'glGetShaderInfoLog', 'glGetProgramiv', 'glGetShaderiv', 'compileProgram', 'compileShader', 'GL_VALIDATE_STATUS', 'GL_LINK_STATUS', 'GL_BOOL', 'GL_BOOL_VEC2', 'GL_BOOL_VEC3', 'GL_BOOL_VEC4', 'GL_FLOAT_MAT2', 'GL_FLOAT_MAT3', 'GL_FLOAT_MAT4', 'GL_FLOAT_VEC2', 'GL_FLOAT_VEC3', 'GL_FLOAT_VEC4', ...]
__file__ = '/home/mcfletch/pylive/OpenGL/GL/shaders.pyc'
__name__ = 'OpenGL.GL.shaders'
__package__ = 'OpenGL.GL'
_excludes = ['glGetProgramiv']
base = 'glVertexAttribPointer'
found = None
glAttachShader = <OpenGL.extensions.glAttachShader object at 0x5dbbdd0>
glBindAttribLocation = <OpenGL.extensions.glBindAttribLocation object at 0x5dc4250>
glCompileShader = <OpenGL.extensions.glCompileShader object at 0x5dbbf90>
glCreateProgram = <OpenGL.extensions.glCreateProgram object at 0x5dbbed0>
glCreateShader = <OpenGL.extensions.glCreateShader object at 0x5dc1090>
glDeleteShader = <OpenGL.extensions.glDeleteShader object at 0x5dca250>
glDetachShader = <OpenGL.extensions.glDetachShader object at 0x5dca1d0>
glDisableVertexAttribArray = <OpenGL.extensions.glDisableVertexAttribArray object at 0x5dc44d0>
glEnableVertexAttribArray = <OpenGL.extensions.glEnableVertexAttribArray object at 0x5dc4110>
glGetActiveAttrib = <OpenGL.extensions.glGetActiveAttrib object at 0x5dc4310>
glGetActiveUniform = <OpenGL.extensions.glGetActiveUniform object at 0x5dc1210>
glGetAttachedShaders = <OpenGL.extensions.glGetAttachedShaders object at 0x5dca2d0>
glGetAttribLocation = <OpenGL.extensions.glGetAttribLocation object at 0x5dc43d0>
glGetInfoLog = <OpenGL.extensions.glGetInfoLogARB object at 0x5dc1290>
glGetProgramInfoLog = <OpenGL.extensions.glGetProgramInfoLog object at 0x5dca350>
glGetProgramiv = <OpenGL.extensions.glGetProgramiv object at 0x5dca4d0>
glGetShaderInfoLog = <OpenGL.extensions.glGetShaderInfoLog object at 0x5dca3d0>
glGetShaderSource = <OpenGL.extensions.glGetShaderSource object at 0x5dc1190>
glGetShaderiv = <OpenGL.extensions.glGetShaderiv object at 0x5dca450>
glGetUniformLocation = <OpenGL.extensions.glGetUniformLocation object at 0x5dbbfd0>
glGetUniformfv = <OpenGL.extensions.glGetUniformfv object at 0x5dc1490>
glGetUniformiv = <OpenGL.extensions.glGetUniformiv object at 0x5dc1510>
glGetVertexAttribPointerv = <OpenGL.extensions.glGetVertexAttribPointerv object at 0x5dc4ad0>
glGetVertexAttribdv = <OpenGL.extensions.glGetVertexAttribdv object at 0x5dc4550>
glGetVertexAttribfv = <OpenGL.extensions.glGetVertexAttribfv object at 0x5dc4790>
glGetVertexAttribiv = <OpenGL.extensions.glGetVertexAttribiv object at 0x5dc48d0>
glIsProgram = <OpenGL.extensions.glIsProgram object at 0x5dc45d0>
glLinkProgram = <OpenGL.extensions.glLinkProgram object at 0x5dc12d0>
glShaderSource = <OpenGL.extensions.glShaderSource object at 0x5dc1610>
glUniform1f = <OpenGL.extensions.glUniform1f object at 0x5dc1690>
glUniform1fv = <OpenGL.extensions.glUniform1fv object at 0x5dbbf10>
glUniform1i = <OpenGL.extensions.glUniform1i object at 0x5dc1250>
glUniform1iv = <OpenGL.extensions.glUniform1iv object at 0x5dc1750>
glUniform2f = <OpenGL.extensions.glUniform2f object at 0x5dc17d0>
glUniform2fv = <OpenGL.extensions.glUniform2fv object at 0x5dc1850>
glUniform2i = <OpenGL.extensions.glUniform2i object at 0x5dc18d0>
glUniform2iv = <OpenGL.extensions.glUniform2iv object at 0x5dc1950>
glUniform3f = <OpenGL.extensions.glUniform3f object at 0x5dc19d0>
glUniform3fv = <OpenGL.extensions.glUniform3fv object at 0x5dc1a50>
glUniform3i = <OpenGL.extensions.glUniform3i object at 0x5dc1ad0>
glUniform3iv = <OpenGL.extensions.glUniform3iv object at 0x5dc1b50>
glUniform4f = <OpenGL.extensions.glUniform4f object at 0x5dc1bd0>
glUniform4fv = <OpenGL.extensions.glUniform4fv object at 0x5dc1c50>
glUniform4i = <OpenGL.extensions.glUniform4i object at 0x5dc1550>
glUniform4iv = <OpenGL.extensions.glUniform4iv object at 0x5dc1310>
glUniformMatrix2fv = <OpenGL.extensions.glUniformMatrix2fv object at 0x5dc1d90>
glUniformMatrix3fv = <OpenGL.extensions.glUniformMatrix3fv object at 0x5dc1e50>
glUniformMatrix4fv = <OpenGL.extensions.glUniformMatrix4fv object at 0x5dc1f10>
glUseProgram = <OpenGL.extensions.glUseProgram object at 0x5dc1f90>
glValidateProgram = <OpenGL.extensions.glValidateProgram object at 0x5dc4090>
glVertexAttrib1d = <OpenGL.extensions.glVertexAttrib1d object at 0x5dc4c90>
glVertexAttrib1dv = <OpenGL.extensions.glVertexAttrib1dv object at 0x5dc4e50>
glVertexAttrib1f = <OpenGL.extensions.glVertexAttrib1f object at 0x5dc4710>
glVertexAttrib1fv = <OpenGL.extensions.glVertexAttrib1fv object at 0x5dc4b10>
glVertexAttrib1s = <OpenGL.extensions.glVertexAttrib1s object at 0x5dc4a50>
glVertexAttrib1sv = <OpenGL.extensions.glVertexAttrib1sv object at 0x5dc4f90>
glVertexAttrib2d = <OpenGL.extensions.glVertexAttrib2d object at 0x5dc4990>
glVertexAttrib2dv = <OpenGL.extensions.glVertexAttrib2dv object at 0x5dc7090>
glVertexAttrib2f = <OpenGL.extensions.glVertexAttrib2f object at 0x5dc7110>
glVertexAttrib2fv = <OpenGL.extensions.glVertexAttrib2fv object at 0x5dc4590>
glVertexAttrib2s = <OpenGL.extensions.glVertexAttrib2s object at 0x5dc4610>
glVertexAttrib2sv = <OpenGL.extensions.glVertexAttrib2sv object at 0x5dc4d10>
glVertexAttrib3d = <OpenGL.extensions.glVertexAttrib3d object at 0x5dc7210>
glVertexAttrib3dv = <OpenGL.extensions.glVertexAttrib3dv object at 0x5dc72d0>
glVertexAttrib3f = <OpenGL.extensions.glVertexAttrib3f object at 0x5dc4410>
glVertexAttrib3fv = <OpenGL.extensions.glVertexAttrib3fv object at 0x5dc7390>
glVertexAttrib3s = <OpenGL.extensions.glVertexAttrib3s object at 0x5dc4890>
glVertexAttrib3sv = <OpenGL.extensions.glVertexAttrib3sv object at 0x5dc7490>
glVertexAttrib4Nbv = <OpenGL.extensions.glVertexAttrib4Nbv object at 0x5dc7550>
glVertexAttrib4Niv = <OpenGL.extensions.glVertexAttrib4Niv object at 0x5dc7610>
glVertexAttrib4Nsv = <OpenGL.extensions.glVertexAttrib4Nsv object at 0x5dc4d50>
glVertexAttrib4Nub = <OpenGL.extensions.glVertexAttrib4Nub object at 0x5dc7750>
glVertexAttrib4Nubv = <OpenGL.extensions.glVertexAttrib4Nubv object at 0x5dc7810>
glVertexAttrib4Nuiv = <OpenGL.extensions.glVertexAttrib4Nuiv object at 0x5dc78d0>
glVertexAttrib4Nusv = <OpenGL.extensions.glVertexAttrib4Nusv object at 0x5dc49d0>
glVertexAttrib4bv = <OpenGL.extensions.glVertexAttrib4bv object at 0x5dc7a10>
glVertexAttrib4d = <OpenGL.extensions.glVertexAttrib4d object at 0x5dc7a90>
glVertexAttrib4dv = <OpenGL.extensions.glVertexAttrib4dv object at 0x5dc7b50>
glVertexAttrib4f = <OpenGL.extensions.glVertexAttrib4f object at 0x5dc46d0>
glVertexAttrib4fv = <OpenGL.extensions.glVertexAttrib4fv object at 0x5dc7c50>
glVertexAttrib4iv = <OpenGL.extensions.glVertexAttrib4iv object at 0x5dc7d10>
glVertexAttrib4s = <OpenGL.extensions.glVertexAttrib4s object at 0x5dc7d90>
glVertexAttrib4sv = <OpenGL.extensions.glVertexAttrib4sv object at 0x5dc7e50>
glVertexAttrib4ubv = <OpenGL.extensions.glVertexAttrib4ubv object at 0x5dc7f10>
glVertexAttrib4uiv = <OpenGL.extensions.glVertexAttrib4uiv object at 0x5dc7fd0>
glVertexAttrib4usv = <OpenGL.extensions.glVertexAttrib4usv object at 0x5dca0d0>
glVertexAttribPointer = <OpenGL.extensions.glVertexAttribPointer object at 0x5dca190>
log = <logging.Logger instance at 0x5afb368>
name = 'wrapper'
suffix = 'ARB'