On 4/1/08, riq <[EMAIL PROTECTED]> wrote: > Hi, > > Has anyone used gluTessCallback from pyglet ? > > http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/glu/tesscallback.html > > The problem I have is that gluTesCallback receives a pointer to a function > as a 3rd parameter... but the pointed function can receive different kind of > arguments depeding on the 2nd parameter: BEGIN, COMBINE, END, etc... > > ...and the current pygle's definition says that it receives a > CfunctionType(None) ( because is was parsed automatically from glu.h ) > > What should I do ? > Shall I create my own implementation if gluTessCallback for each parameter. > eg: > > gluTessCallbackBegin = _link_function('gluTessCallback', > None, [POINTER(GLUtesselator), GLenum, CfunctionType(None, GLenum) ], None) > gluTessCallbackCombine = _link_function('gluTessCallback', > None, [POINTER(GLUtesselator), GLenum, CfunctionType(None, > POINTER(GLdouble), POINTER(GLvoid), POINTER( GLfloat), POINTER(GLvoid)) ], > None)
That might be the only way. Casting might also work, depending on when the ctypes trampoline converts arguments. Alex. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
