Sampling pixels...

BlitzMax Forums/BlitzMax Beginners Area/Sampling pixels...

Dubious Drewski(Posted 2005) [#1]
What's the best way to do it?

To be honest, I can't figure out any way to do it. I've seen an example where someone sampled from a loaded file.
I need need to sample directly from the screen buffer.

I can't find the topic in the forums either. Any help would be great.


LarsG(Posted 2005) [#2]
what do you mean "sample"?

do you mean reading the pixels from the screen?


ImaginaryHuman(Posted 2005) [#3]
You either have to use GrabPixmap and then look at the content of the pixmap data, or use glReadPixels() to save off some pixels into a buffer in main memory then examine that. Not sure if there is a DirectX solution.