Re: glReadPixels and viewport problem
Mårten Strömberg <[email protected]> Thu, 27 Nov 2003 13:04:28 +0100
| Newsgroups | gmane.linux.opengl |
|---|---|
| Message-ID | <[email protected]> |
On Thursday 27 November 2003 01.54, Paulo Jorge de Oliveira Cantante de= Matos=20 wrote: > Hi Marten, > > Thanks a lot for the help, that was indeed the problem. :D It's > everything working now! :D Good! > I've subscribed two weeks ago and your message was the first I've > received. :Dhehe, unfortunately it seems inactive! :( This is a little strange. Personally I use both Linux and OpenGL a lot,= and it=20 is a powerful combination. Exchanging experience in these fields would = seem=20 like a natural thing to do. Maybe there are more focused forums for eac= h of=20 the topics? Is this list REALLY dead?? (come on!) /Marten > > Best regards, > > Paulo Matos > > On Wed, 2003-11-26 at 23:58, M=E5rten Str=F6mberg wrote: > > Paulo, > > > > Try the following before calling glReadPixels: > > > > glPixelStorei(GL_PACK_ALIGNMENT, 1); > > > > I believe it defaults to 4, which is not a divisor of 250. > > > > BTW, I did not remember being subscribed to linux-opengl! Is the li= st > > still active? > > > > Regards, > > Marten > > > > > > On Thursday 27 November 2003 00.35, Paulo Jorge de Oliveira Cantant= e de > > Matos > > > > 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 > > > 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 exam= ple. > > > 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 f= ile > > > from the glReadPixels buffer since it was tested by some people a= nd 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, - 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