Re: [PyOpenGL-Users] glDeleteBuffers() and arrays.vbo
Brought to you by:
mcfletch
From: Dan H. <Dan...@no...> - 2009-07-27 16:31:18
|
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. > That's now fixed in bzr head, will show up in the 3.0.1a2 release. i.e. > we catch the NullFunctionError, so you shouldn't see the ignored error > messages any more. Great, thanks! > That said, you *shouldn't* ever need to explicitly call delete on the > VBO instance unless for some reason you want to "reuse" the VBO object > but not the GL-side buffer (I can't think of a real use-case for that). Gotcha. Dan |