[PyOpenGL-Users] glDrawElements access violation when passed numpy array
Brought to you by:
mcfletch
|
From: Keith C S. <kc...@ra...> - 2013-10-07 20:39:40
|
I'm using visvis for plotting scientific data as triangular facets.
visvis generates several windows. When I interact (rotate, zoom) with the
windows I eventual
get intermittent access violations when generating meshes. self._faces is
a numpy UINT32 array
I see this behavior on several workstations with Nivida card running
Windows XP and Windows 7
File "C:\Users\~\Python33\lib\site-packages\visvis\wobjects
\polygonalModeling.py", line 1086, in _Draw
gl.glDrawElements(type, N, face_dtype, self._faces)
File "C:\Users\~\Python33\lib\site-packages\OpenGL\latebind.py", line 41,
in __call__
return self._finalCall( *args, **named )
File "C:\Users\~\Python33\lib\site-packages\OpenGL\wrapper.py", line 765,
in wrapperCall
result = self.wrappedOperation( *cArguments )
OSError: exception: access violation reading 0xFFFFFFFC07536F1C
Have tried replacing "gl.glDrawElements(type, N, face_dtype, self._faces)"
with "gl.glDrawElements(type, N, face_dtype, self._faces.ctypes.data_as
(ctypes.POINTER(ctypes.c_long)))". Seems to crash less on Windows 7, but
no change on Windows XP.
I also tried using VBOs
self.indexPositions.bind()
self.vertexPositions.bind()
gl.glEnableVertexAttribArray(0);
gl.glVertexAttribPointer(0, 3, gl.GL_FLOAT, False, 0, None)
gl.glDrawElements(type, N, face_dtype, None
Didn't seem to crash on Windows 7, but messes up visvis labels, shading,
etc.
Windows 7:
Python 3.3.2
visvis 1.8
pyOpenGL 3.0.2
Graphic Adapter: Nivida Quadro 4000, driver 297.03
Also crashes in same way on two other Windows XP workstations with Nivida
cards.
Does anyone have similar experiences and know of possible solutions?
thanks
Keith |