OpenGL.GLU.tess
index
/var/pylive/OpenGL-ctypes/OpenGL/GLU/tess.py

Wrapper/Implementation of the GLU tessellator objects for PyOpenGL

 
Modules
       
OpenGL.arrays
OpenGL.constants
ctypes
OpenGL.GLU.glustruct
OpenGL.raw.GLU

 
Classes
       
GLUStruct(Structure)
GLUtesselator(GLUtesselator, GLUStruct)
GLUtesselator(Structure)
GLUtesselator(GLUtesselator, GLUStruct)

 
class GLUtesselator(GLUtesselator, GLUStruct)
    Implementation class for GLUTessellator structures in OpenGL-ctypes
 
 
Method resolution order:
GLUtesselator
GLUtesselator
GLUStruct
Structure
_ctypes._CData
object

Methods defined here:
combineWrapper(self, function)
Wrap a Python function with ctypes-compatible wrapper for combine callback
 
For a Python combine callback, the signature looks like this:
        def combine(
                GLdouble coords[3], 
                void *vertex_data[4], 
                GLfloat weight[4]
        ):
                return data
While the C signature looks like this:
        void combine( 
                GLdouble coords[3], 
                void *vertex_data[4], 
                GLfloat weight[4], 
                void **outData 
        )
dataWrapper(self, function)
Wrap a function which only has the one data-pointer as last arg
dataWrapper2(self, function)
Wrap a function which has two data-pointers as last args
gluTessBeginPolygon(self, data)
Note the object pointer to return it as a Python object
gluTessVertex(self, location, data=None)
Add a vertex to this tessellator, storing data for later lookup
vertexWrapper(self, function)
Converts a vertex-pointer into an OOR vertex for processing

Data and other attributes defined here:
CALLBACK_FUNCTION_REGISTRARS = {GLU_TESS_BEGIN: <CFunctionType object>, GLU_TESS_VERTEX: <CFunctionType object>, GLU_TESS_END: <CFunctionType object>, GLU_TESS_ERROR: <CFunctionType object>, GLU_TESS_EDGE_FLAG: <CFunctionType object>, GLU_TESS_COMBINE: <CFunctionType object>, GLU_TESS_BEGIN_DATA: <CFunctionType object>, GLU_TESS_VERTEX_DATA: <CFunctionType object>, GLU_TESS_END_DATA: <CFunctionType object>, GLU_TESS_ERROR_DATA: <CFunctionType object>, ...}
CALLBACK_TYPES = {GLU_TESS_BEGIN: <class 'ctypes.CFunctionType'>, GLU_TESS_VERTEX: <class 'ctypes.CFunctionType'>, GLU_TESS_END: <class 'ctypes.CFunctionType'>, GLU_TESS_ERROR: <class 'ctypes.CFunctionType'>, GLU_TESS_EDGE_FLAG: <class 'ctypes.CFunctionType'>, GLU_TESS_COMBINE: <class 'ctypes.CFunctionType'>, GLU_TESS_BEGIN_DATA: <class 'ctypes.CFunctionType'>, GLU_TESS_VERTEX_DATA: <class 'ctypes.CFunctionType'>, GLU_TESS_END_DATA: <class 'ctypes.CFunctionType'>, GLU_TESS_ERROR_DATA: <class 'ctypes.CFunctionType'>, ...}
WRAPPER_METHODS = {GLU_TESS_VERTEX: 'vertexWrapper', GLU_TESS_COMBINE: 'combineWrapper', GLU_TESS_BEGIN_DATA: 'dataWrapper', GLU_TESS_VERTEX_DATA: 'vertexWrapper', GLU_TESS_END_DATA: 'dataWrapper', GLU_TESS_ERROR_DATA: 'dataWrapper', GLU_TESS_EDGE_FLAG_DATA: 'dataWrapper', GLU_TESS_COMBINE_DATA: 'combineWrapper'}

Data and other attributes inherited from GLUtesselator:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'GLUtesselator' objects>
list of weak references to the object (if defined)

Methods inherited from GLUStruct:
addCallback(self, which, function)
Register a callback for this structure object
getAsParam(self)
Gets as a ctypes pointer to the underlying structure
noteObject(self, object)
Note object for later retrieval as a Python object pointer
 
This is the registration point for "original object return", returns 
a void pointer to the Python object, though this is, effectively, an 
opaque value.
originalObject(self, voidPointer)
Given a void-pointer, try to find our original Python object
ptrAsArray(self, ptr, length, type)
Copy length values from ptr into new array of given type

Methods inherited from Structure:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

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

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(...)
__hash__(...)
x.__hash__() <==> hash(x)

 
Functions
       
gluGetTessProperty(tess, which, data=None)
Retrieve single double for a tessellator property
gluNewTess()
Get a new tessellator object (just unpacks the pointer for you)
gluNewTessBase = gluNewTess(...)
gluNewTess(  ) -> POINTER(GLUtesselator)
gluTessBeginPolygon(tess, data)
Start definition of polygon in the tessellator
gluTessCallback(tess, which, function)
Set a given gluTessellator callback for the given tessellator
gluTessVertex(tess, location, data=None)
Add a vertex to the tessellator's current polygon
gluTessVertex( tess,location,data )
pyConverters: tess=None, location=
asArraySize(incoming, function, args)
, data=None
cConverters: tess=None, location=<OpenGL.converters.getPyArgsName object>, data=None
cResolvers: Not Used
storeValues: Not Used
returnValues:
returnPointer(result, baseOperation, pyArgs, cArgs)
Return the converted object as result of function
 
Note: this is a hack that always returns pyArgs[0]!
Wrapping Operation: gluTessVertex( POINTER(GLUtesselator)(tess), arrays.GLdoubleArray(location), POINTER(GLvoid)(data) ) -> None

 
Data
        GLU = <CDLL 'libGLU.so.1', handle 80e74a8 at b7c2118c>
__all__ = ('gluNewTess', 'gluGetTessProperty', 'gluTessBeginPolygon', 'gluTessCallback', 'gluTessVertex')