is this possible?

i need to read from buffer with glreadpixels
what i would like to do is to regularly skip pixels while copying pixels into memory
i mean:
say i want to store into mem pixels from (0,0) to (256,256) into a 128x128 mem area
what i’m doing right now is store the pixels into a 256x256 mem area and then scale to 128x128
so can it be done automatically skipping pixels while reading frame buffer?
unfortunately pixelstore can do nothing similar
thanks a lot for your help

anyone?

It would be very easy to write your own routine to do this with a call to glReadPixels().

perhaps
copy the 256x256 into a texture
draw the texture at 128x128 size
then do a readpixels of 128x128

thanks a lot for your replys
Omaha: you mean i should call readpixels a number of times? if so i thought of that but haven’t tried yet because i guess it would cause too much overhead

zed: no need to do that do that, i need to manipulate this data before uploading to texture

anyway i’m arguing there’s no way of skipping pixels with a single glreadpixels?

once again thansk a lot

Originally posted by tellaman:
zed: no need to do that do that, i need to manipulate this data before uploading to texture

what are you planing to do? generating mipmaps or what?
if you can DONT do readpixels. so explain what you try to do and we’ll tell you if you can do it without readpixels…

no mipmaps
i definitely need glreadpixels since glcopyteximage directly uploads data to texture so that i cant manipulate pixels any more
i would simply like to call glreadpixels once skipping some pixels while copying data to memory
but i guess this is not possible

[This message has been edited by tellaman (edited 05-26-2002).]

if you would tell us what you plan to do we can tell you how to do this on the gpu directly, with some renderings of quads for example, or what ever.
but what you ask for:no
so lets find another way…
if a way does not solve your problem, go for another way. if you tell us your problem we can show you the door you have to open…