View Single Post
Old 13 January 2018, 11:52   #39
Master484
Registered User
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 349
Quote:
Ask yourself - how will you know if those pixels have changed from the previous frame?
I would make a data table which holds the color values of each pixel in the screen.

And when drawing new pixels to screen, I would check the old values from this table, and in those cases where the old pixel color is different from the one that I'm going to draw, then I would update both the pixel on the screen and the value in the data table.

Also only those pixel values would need to be checked that are going to be updated this frame. So we wouldn't need to go through the whole data table.

Although of course doing this stuff would consume time...but if lots of pixel drawing and screen clearing every frame could be skipped, then could it be faster? I don't know, just throwing the idea around.

Last edited by Master484; 13 January 2018 at 12:00.
Master484 is offline  
 
Page generated in 0.04176 seconds with 11 queries