Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
mr_ped is currently offline  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.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: let's discuss new Draw principles and problems...
Next Topic: A list of SQL dialects to support (eventually)..
Goto Forum:
  


Current Time: Sun Jun 08 20:31:08 CEST 2025

Total time taken to generate the page: 0.04216 seconds