PDA

View Full Version : glDrawPixels and memory layout



Kennith
12-07-2004, 02:30 AM
Hi,

I would like to know if it is possible (I would guess using glPixelStorei functions) to draw an image to screen (with glDrawPixels) using every Nth pixel from an image in processor memory?

For an image I want to draw on screen of W by H pixels, each row is created from a linear array of W*N pixels in processor memory (and the image is a linear array of at least W*H*N pixels in total, N could be theoretically anywhere from 1 to inf, but realistically from 1 -> 1000).

Hardware limitations mean that using a 3D texture is not really a suitable alternative.

Note to moderators,
I have posted this on the Beginners forum a week ago but despite one reply, it didn't really answer my question, so I hope to get a attract a different audience here. Perhaps the other thread could be moved / pasted into this one / deleted? I couldn't see anything about this in the FAQ. You have my apologies if this is poor etiquette :confused: .

A different description (two, in fact) of the same problem can be read in this thread on the beginners forum:

glDrawPixels and memory layout(beginners) (http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=2;t=017670)

Thanks for any help or suggestions :)