Re: [PyOpenGL-Users] using glGetSynciv
Brought to you by:
mcfletch
|
From: Henry G. <he...@ca...> - 2011-05-23 21:44:33
|
On Mon, 2011-05-23 at 15:08 -0400, Mike C. Fletcher wrote:
> > my_sync = GL_sync.glFenceSync(GL_sync.GL_SYNC_GPU_COMMANDS_COMPLETE,
> 0)
> >
> > a = numpy.zeros(10, dtype='uint32')
> > foo = GL_sync.glGetSynciv(my_sync,
> > GL_sync.GL_SYNC_STATUS,
> > 10, None, a)
> >
> > Running it returns the following error that I am having trouble
> parsing:
> >
> > ctypes.ArgumentError: argument 1: <type 'exceptions.TypeError'>:
> > ("byref() argument must be a ctypes instance, not 'int'", ' If you
> have
> > ERROR_ON_COPY enabled, remember to pass in an array to
> array-requiring
> > functions.')
> >
> > The trouble is that I'm not sure to which argument it is referring.
> I am
> > not sufficiently familiar with the PyOpenGL interface.
> It's a little obtuse there, I believe the problem is the None, it
> should
> be a GL.GLsizei() instance (or a single-integer numpy array). It will
> have its .value set to the number of records written into a.
>
That didn't seem to be the problem.
I've had a bit more of a play. Its seems that the problem is *actually*
the first argument: my_sync is an integer. I can't find the type that it
actually needs as the argument though. I've not idea what GLsync
actually is.
Cheers,
Henry
|