--- "Mike C. Fletcher" <mcfletch@...> wrote:
> Hart's Antler wrote:
> > I am using the latest pyopengl (ctypes based) release for Ubuntu Gusty. I am unable to read
> > zbuffer using glreadpixels GL_DEPTH_COMPONENT, my function had worked before with the much
> > pyopengl2.x series. I'm not sure if this is a bug in new ctypes-pyopengl or is it my ATI
> > not supporting that feature. I'm wondering if anybody has had any luck doing this? One note
> > that i can read the zbuffer directly into a texture (for shadows) with no problem using
> If you can send me a sample script that demonstrates the problem I can
> far more easily fix the bug. It does sound like a bug, incidentally.
> The image handling code is completely rewritten, so it's not unlikely
> there would be differences between the old and new implementations.
i dont have a stripped down example, but the code is just 3 lines you can insert into any pyopengl
data = glReadPixels(0,0,x,y, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE) # note x,y are screen size
img = Image.fromstring( 'L', (x,y), data ) # requires PIL
img.save( 'z.bmp' ) # when you open z.bmp you will find that it is blank - all white.
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping