Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


#ActualDimension10

Posted 16 July 2013 - 09:58 PM

"You could sample 1 pixel out of every 4x4 pixel square across the screen and cut your work to 1/16th of the StretchBlt method"

 

I figured that much. I was working on a method, actually, for creating a pixel density function so that the samples are more dense near the edges of the screen.

 

But I figured stuff like BitBlt and StretchBlt would grab a whole chunk of data while it's open, THEN extract what it needs.

 

I figure the only method I would really have for grabbing individual pixels is GetPixel(). But since it would re-access the device context each time, I figured that would be like shutting off the engine in your car every time you make a new turn.

 

I like your idea of keeping a few frames. It would also be interesting to dither the samples in a sense, like take a random pixel out of each 4x4 block, and keep the previous two or so frames.

 

 

Edit: And one more quick thing, if possible. How would I go about creating a buffer HDC? I tried creating one, and all I really got was a mess of digits that remained static. So as it is, I'm writing the average color to a pixel, and writing that pixel at 0,0 on my screen, then accessing the whole screen again just to grab that pixel.


#1Dimension10

Posted 16 July 2013 - 09:54 PM

"You could sample 1 pixel out of every 4x4 pixel square across the screen and cut your work to 1/16th of the StretchBlt method"

 

I figured that much. I was working on a method, actually, for creating a pixel density function so that the samples are more dense near the edges of the screen.

 

But I figured stuff like BitBlt and StretchBlt would grab a whole chunk of data while it's open, THEN extract what it needs.

 

I figure the only method I would really have for grabbing individual pixels is GetPixel(). But since it would re-access the device context each time, I figured that would be like shutting off the engine in your car every time you make a new turn.

 

I like your idea of keeping a few frames. It would also be interesting to dither the samples in a sense, like take a random pixel out of each 4x4 block, and keep the previous two or so frames.


PARTNERS