Re: glReadPixels and viewport problem

Paulo Jorge de Oliveira Cantante de Matos <[email protected]> Thu, 27 Nov 2003 00:54:33 +0000
Newsgroups gmane.linux.opengl
Message-ID <1069894473.3269.41.camel@localhost>
Hi Marten,=20

Thanks a lot for the help, that was indeed the problem. :D It's
everything working now! :D

I've subscribed two weeks ago and your message was the first I've
received. :Dhehe, unfortunately it seems inactive! :(

Best regards,

Paulo Matos

On Wed, 2003-11-26 at 23:58, M=E5rten Str=F6mberg wrote:
> Paulo,
>=20
> Try the following before calling glReadPixels:
>=20
>   glPixelStorei(GL_PACK_ALIGNMENT, 1);
>=20
> I believe it defaults to 4, which is not a divisor of 250.
>=20
> BTW, I did not remember being subscribed to linux-opengl! Is the list=
 still=20
> active?
>=20
> Regards,
> Marten
>=20
>=20
> On Thursday 27 November 2003 00.35, Paulo Jorge de Oliveira Cantante =
de Matos=20
> wrote:
> > 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 depe=
nding
> > on the viewport size arises. If the viewport is 250x250, the buffer
> > returned from glReadPixels shows the viewport in 'italic' (the imag=
e is
> > incorrect), a vertical line comes as a diagonal for example. Howeve=
r, if
> > size is 500x500, everything is fine. Other similar situations arise
> > depending on the viewport size. This is indeed strange, I've not se=
t 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 t=
o
> > 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 fil=
e
> > 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 no=
t in
> > the PPM file but it's not probable).
> >
> > Best regards,
--=20

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