[PyOpenGL-Users] glDrawPixels source data
Brought to you by:
mcfletch
From: Gavin B. <ga...@an...> - 2005-02-17 02:56:13
|
Hi, I am using PyOpenGL (with wxPython) to do some image processing. We are processing the data in a C module and returning this to Python to draw with glDrawPixels() via PyString_FromStringAndSize(...). This works fine, but is inefficient as it is copying every single frame. Ideally we would like to be able to use a buffer object to simply wrapper the memory, using PyBuffer_FromMemory() but this doesn't work (it segfaults). So is there a way I can pass a Buffer object to glDrawPixels? If not, how might one go about adding this sort of support? I am prepared to have a go at adding this support if I can. Thanks, :: Gavin |