Hello,
I would like do Picking but I have the error:
Segmentation fault
My code:
viewport = (GLint*4)()
glGetIntegerv(GL_VIEWPORT, viewport)
---------------------------------------------------------------
buffer = (GLuint*512)()
glSelectBuffer(512, buffer)
#Segmentation fault
-------------------------------------------------------------
or
-------------------------------------------------------------
select_buffer = ctypes.cast((512 * GLuint)(),
ctypes.POINTER(GLuint))
glSelectBuffer(512, select_buffer)
#pyglet.gl.lib.GLException: invalid operation
-------------------------------------------------------------
glRenderMode(GL_SELECT)
glMatrixMode(GL_PROJECTION)
glPushMatrix()
glLoadIdentity()
gluPickMatrix(x,viewport[3]-y,5,5,viewport)
gluOrtho2D(-self.w*self.z,self.w*self.z,-self.h*self.z,self.h*self.z)
glMatrixMode(GL_MODELVIEW)
glInitNames()
What I am doing wrong?
Thanks in advance.
--
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.