MeiChun-Lo / pixeltoaster

Automatically exported from code.google.com/p/pixeltoaster
0 stars 0 forks source link

add ability to perform partial display updates #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
this will be particularly awesome for raytracers and other slow processes
that update a line at a time -- for example, the biggest bottleneck in the
"fractal" demo is the high cost of copying the entire framebuffer each time
a line is rendered

Original issue reported on code.google.com by glenn.fi...@gmail.com on 7 Sep 2006 at 6:41

GoogleCodeExporter commented 9 years ago
We'd need to add a dirty box to the update function to get this right.  Any 
thoughts
how?  Perhaps by simply adding a Rectangle structure to PixelToaster like this:

struct Rectangle;
{
   int xbegin;
   int xend;
   int ybegin;
   int yend;
};

begin and end would be like iterators to allow empty rectangles: [begin, end)

What do you think?

Original comment by bram.deg...@gmail.com on 25 Jul 2007 at 10:10

GoogleCodeExporter commented 9 years ago

Original comment by bram.deg...@gmail.com on 26 Jul 2007 at 7:03

GoogleCodeExporter commented 9 years ago
I've committed a first attempt to the trunk (r132).  

API change: the update functions take an optional pointer to a rectangle 
defining the
dirty box.  The dirty box only acts as a hint to the implementation which may 
just do
a full buffer update instead.  So you must always supply full buffer 
information.

The windows implementation already uses this dirty box, the unix implementation 
not
(but still functions correctly)

What do you think? 

Original comment by bram.deg...@gmail.com on 30 Jul 2007 at 1:43