glReadPixels and viewport problem

Paulo Jorge de Oliveira Cantante de Matos <[email protected]> Wed, 26 Nov 2003 23:35:27 +0000
Newsgroups gmane.linux.opengl
Message-ID <1069889727.3271.37.camel@localhost>
Hi all,

I'm developing an application in which I get the viewport through
glReadPixels and then I write it in to a PPM file. A situation depending
on the viewport size arises. If the viewport is 250x250, the buffer
returned from glReadPixels shows the viewport in 'italic' (the image is
incorrect), a vertical line comes as a diagonal for example. However, if
size is 500x500, everything is fine. Other similar situations arise
depending on the viewport size. This is indeed strange, I've not set any
state variable relating to glReadPixels, do I need to set or enable any
special variable? Is this a known issue?

I've decided not to include any code, if you would like some code to
test it, I'll be happy to send it to you privately.

Oh, and the problem is not in the procedure that writes the PPM file
from the glReadPixels buffer since it was tested by some people and all
get the same results with glReadPixels (I cannot assure you it's not in
the PPM file but it's not probable).

Best regards,
-- 

Paulo J. Matos : pocm [_at_] mega . ist . utl . pt
Instituto Superior Tecnico - Lisbon
Computer and Software Eng. - A.I.
 - > http://mega.ist.utl.pt/~pocm
---
        -> God had a deadline...
                So, he wrote it all in Lisp!

-
To unsubscribe from this list: send the line "unsubscribe linux-opengl" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html