glDrawElements access violation when passed numpy array
Keith C Smith <[email protected]> Mon, 7 Oct 2013 13:18:15 -0700
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <OFB8D54F82.A354063A-ON88257BFD.006DE3BA-88257BFD.006F8960@mck.us.ray.com> |
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
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users