Hi all - quick ctypes question. I'm experimenting with stencil buffer picking and I need to pass an array of GLuints to glSelectBuffer. Problem is, while my research has turned up information about passing simple types by reference, I'm having trouble nutting out passing an array. I'm sure I'm missing something simple - If you can help, lemme know what it is so I can get to the forehead-slapping stage. :)
Here's a simple run-down of the code: BUFSIZE = 512 selectBufType = GLuint * BUFSIZE selectBuf = selectBufType() # This version causes "ctypes.ArgumentError: argument 2: # exceptions.TypeError: expected LP_c_long instance instead of _ctypes.ArrayType" glSelectBuffer(BUFSIZE, selectBuf) # This version causes "ctypes.ArgumentError: argument 2: # exceptions.TypeError: expected LP_c_ulong instance instead of pointer to c_ulong_Array_512 glSelectBuffer(BUFSIZE, byref(selectBuf)) Any ideas? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
