Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Fastest method for direct pixel modification

$
0
0

@ethan wrote:

Hey All,

I have an animation algorithm which works by taking all the pixel values on the screen and slightly modifying their colors. Unsurprisingly, for big screens this really chugs, since it performs multiple operations for every individual pixel. Currently I am implementing this by reading the screen into an ofImage, looking at each pixel, and writing new pixels based on those values. I then draw this new ofImage. For fullspeed playback, I have an array of ofImages of every frame preprocessed and draw them for each frame.

I'm wondering whether this is the fastest process or if there are better methods. Does openGL have anything which makes it easier to read pixels without the intermediary object? When doing operations which don't require any other drawing methods, I'm simply using the previous ofImage, which does help a little.

I saw this exact question hadn't been asked for a few years and just wanted to check whether I'm thinking about the problem correctly since I'm planning to do a lot with this effect.

Thanks in advance for any help.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles