Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Correct buffering technique?
Correct buffering technique? [message #10581] |
Tue, 17 July 2007 17:10  |
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
|
|
|
|
Goto Forum:
Current Time: Mon May 29 23:47:06 CEST 2023
Total time taken to generate the page: 0.01441 seconds
|