[PyOpenGL-Users] Upcoming fix may cause minor incompatibility...
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@ro...> - 2004-10-16 20:28:16
|
I've just checked in changes on the 2.0.1 maintenance branch that fix a bug in how glDrawPixelsXX (that is, all glDrawPixels calls which take an array argument, rather than a string) operates. The code was previously (unintentionally) reversing the first and second arguments, so that it would take (height,width) rather than (width,height) from the array to decide how to render it. If you have any code that uses glDrawPixelsXX you will find that this fix causes your code to stop working. Solution is simply to use properly-sized arrays (i.e. if you want an image 300x100 pixels wide it's shape should be (300,100,depth), rather than (100,300,depth)). If you can't make that change, then simply assigning array.shape = (array.shape[1],array.shape[0]) + array.shape(2:]) will allow you to continue operating as before. This bug does not affect string-based glDrawPixels calls. Enjoy yourselves, Mike ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |