Re: [PyOpenGL-Users] using glGetSynciv
Brought to you by:
mcfletch
|
From: Mike C. F. <mcf...@vr...> - 2011-05-23 19:08:57
|
On 11-05-23 04:57 AM, Henry Gomersall wrote:
> I'm trying to query the status of a fence I've created using
> glFenceSync, using the following snippet:
>
> 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.
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
|