Re: [PyOpenGL-Users] glDrawPixels
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2007-10-09 02:49:41
|
Jason Ward wrote: > Hi I am trying to call glDrawPixels but it doesn't seem to be working. > I say: > from numpy import arange > pixels = arange( float( 1024*768*3 )) > for j in range(1024*768*3): > pixels[j]=float(1) > > #Normal opengl setup code etc > glDrawPixels(1024,768,GL_RGB,GL_FLOAT,pixels) > > # I am using a 1D array that will be organised in the right fashion, > but IDLE keeps crashing with this line of code I've attached a simple sample of usage for glDrawPixels. Without seeing the actual failing code I can't be sure what's going wrong, but the likely cause is failing to set up the pixel transfer mode (which can result in trying to read more data than is allowed, causing a protection fault). HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |