Question

PyOpenGL docs say:

Because of the way OpenGL and ctypes handle, for instance, pointers, to array data, it is often necessary to ensure that a Python data-structure is retained (i.e. not garbage collected). This is done by storing the data in an array of data-values that are indexed by a context-specific key. The functions to provide this functionality are provided by the OpenGL.contextdata module.

When exactly is it the case?

One situation I've got in my mind is client-side vertex arrays back from OpenGL 1, but they have been replaced by buffer objects for years. A client side array isn't required any more after a buffer object is filled (= right after glBufferData returns, I pressume).

Are there any scenarios I'm missing?

Was it helpful?

Solution

Are there any scenarios I'm missing?

Buffer mappings obtained through glMapBuffer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top