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 » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Correct buffering technique?
Correct buffering technique? [message #10581] Tue, 17 July 2007 17:10 Go to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I have several ctrls with slow Paint functions that display complex real-time data. Becuase certain actions can cause lots of display refreshes (like dragging a window) I would like to maintain a buffer to reduce CPU load between refreshes:
		if (bufferdirty) {
			buffer.Create(GetView().Size());
			BufferPaint(buffer);
			bufferdirty = false;
		}
		buffer.Put(w, 0, 0);

buffer is a BackDraw object (I was going to use ImageDraw before I saw BackDraw). This seems to work OK, but is this the way to do it?

Cheers,
James

 
Read Message
Read Message
Previous Topic: How to Draw into an existing image(buffer) ?
Next Topic: Load truetype font from file?
Goto Forum:
  


Current Time: Thu Mar 28 14:46:50 CET 2024

Total time taken to generate the page: 0.00880 seconds