Re: [PyOpenGL-Users] glDeleteBuffers() and arrays.vbo
Brought to you by:
mcfletch
From: Dan H. <Dan...@no...> - 2009-07-27 17:40:50
|
Dan Helfman wrote: > Mike C. Fletcher wrote: >> Dan Helfman wrote: >>> Exception OpenGL.error.NullFunctionError: NullFunctionError('Attempt to >>> call an undefined function glDeleteBuffers, check for >>> bool(glDeleteBuffers) before calling',) in <function doBufferDeletion at >>> 0x0A8892B0> ignored >>> >> This sounds like the VBO is getting deleted after module cleanup? You >> should always have a glDeleteBuffers implementation if you have a >> glGenBuffers implementation. Basically this code is getting called >> after the system has done so much cleanup that the functions aren't >> available any more (at least, that's my interpretation). > > This is happening when a VBO instance is finalized after its containing > object goes away. And as far as I can tell, the deleter is only being > called once for each VBO. So I'm not sure what else could be doing the > cleanup unless it's in the underlying C code. I put some prints in the > explicit VBO.delete() call, so I've confirmed that that's not getting > called. > > I should mention that this is all with the 3.0.0 release. Follow-up: Upon further investigation, turns out that this is a threading issue. GL and the VBOs were initialized in one thread, and then VBO finalization was getting triggered from a different thread. As soon as I changed it so that the VBO deleter only got triggered from the correct thread, the NullFunctionErrors went away. Dan |