Home » Developing U++ » U++ Developers corner » Should we double-buffer by default?
Re: Should we double-buffer by default? [message #4076 is a reply to message #4053] |
Wed, 19 July 2006 15:04  |
mr_ped
Messages: 826 Registered: November 2005 Location: Czech Republic - Praha
|
Experienced Contributor |
|
|
There's another "span buffer" technique also as third option, but it's way too different from single/double buffer.
I was using it with my 2D parallax scrolling engine for one never released 2D shooter game, and it allowed me to do things like 10+ parallax layers with ~30 FPS on 133MHz in 640x480, but you gain performance only if lot of areas are redrawed, what IMHO doesn't seem like the case for ordinary GUI controls.
(except transparent controls, where the span buffer will help partially to detect everything hidden behind solid spans (if some controls do overlap), but in the end you will need to draw the solid background and than run as many passes again as many transparent spans are above the solid one, so there's no performance gain)
Another slight advantage is, that with span buffer you can refresh the content of window from top to down line by line, while double-buffering only single line being processed, so you need less memory on graphics card (1 frame buffer + 1 line), but again U++ is so far used on ordinary PC = plenty of memory. (maybe on PocketPC it can be more interesting option...)
But the main disadvantage is you must render everything with spans, so that would mean SW render of anything. Also antialiasing/cleartype would require lot of thinking and improving of the original simple span buffer. Manageable, but too complex.
One final note... I always use only "rectangle" during window resize, the "resize with content visible" always seems too slow for me.
|
|
|
 |
|
Should we double-buffer by default?
By: mirek on Tue, 18 July 2006 15:23
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Tue, 18 July 2006 15:31
|
 |
|
Re: Should we double-buffer by default?
By: unodgs on Tue, 18 July 2006 15:56
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Tue, 18 July 2006 16:36
|
 |
|
Re: Should we double-buffer by default?
By: unodgs on Tue, 18 July 2006 23:43
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Tue, 18 July 2006 23:57
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Wed, 19 July 2006 00:42
|
 |
|
Re: Should we double-buffer by default?
By: unodgs on Wed, 19 July 2006 08:09
|
 |
|
Re: Should we double-buffer by default?
By: unodgs on Wed, 19 July 2006 08:34
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Wed, 19 July 2006 09:01
|
 |
|
Re: Should we double-buffer by default?
By: unodgs on Wed, 19 July 2006 10:09
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Wed, 19 July 2006 11:01
|
 |
|
Re: Should we double-buffer by default?
By: unodgs on Wed, 19 July 2006 11:18
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Wed, 19 July 2006 11:47
|
 |
|
Re: Should we double-buffer by default?
By: unodgs on Wed, 19 July 2006 16:25
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Wed, 19 July 2006 16:43
|
 |
|
Re: Should we double-buffer by default?
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Wed, 19 July 2006 18:56
|
 |
|
Re: Should we double-buffer by default?
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Wed, 19 July 2006 21:14
|
 |
|
Re: Should we double-buffer by default?
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Fri, 21 July 2006 10:44
|
 |
|
Re: Should we double-buffer by default?
By: mirek on Fri, 21 July 2006 12:10
|
 |
|
Re: Should we double-buffer by default?
|
 |
|
Re: Should we double-buffer by default?
By: mr_ped on Wed, 19 July 2006 15:04
|
Goto Forum:
Current Time: Sun Jun 08 20:31:08 CEST 2025
Total time taken to generate the page: 0.04216 seconds
|