[PyOpenGL-Users] Very slow DrawPixels
Brought to you by:
mcfletch
From: Mathew Y. <ma...@fu...> - 2001-10-23 02:12:26
|
The current implementation of DrawPixels (using Numeric) is very slow when arbitrary sub rectangles from a large array are to be displayed. Instead of this, I first make sure that may array is contigous and then in DrawPixelsus I use glPixelStorei(GL_UNPACK_SKIP_ROWS,starty); glPixelStorei(GL_UNPACK_SKIP_PIXELS,startx); glPixelStorei(GL_UNPACK_ROW_LENGTH,cols); and just pass a pointer to my arrays data. MUCH faster. Mathew |