Talk:Double Buffering: Difference between revisions

From OSDev.wiki
Latest comment: 14 years ago by Teodor väänänen
Jump to navigation Jump to search
Content added Content deleted
(→‎C/C++ examples: new section)
Line 11: Line 11:
Is there really a need for two almost identical pieces of code just to show off reinterpret_cast and the new-operator? If you're writing an OS in C++, you should be familiar with these two anyway.
Is there really a need for two almost identical pieces of code just to show off reinterpret_cast and the new-operator? If you're writing an OS in C++, you should be familiar with these two anyway.
--[[User:Darkinsanity|Darkinsanity]] 19:17, 8 November 2014 (CST)
--[[User:Darkinsanity|Darkinsanity]] 19:17, 8 November 2014 (CST)

: Besides being redundant, it also makes the glaring error of using bits per pixel instead of bytes per pixel. I'll clean it up - [[User:Combuster|Combuster]] 04:37, 9 November 2014 (CST)

Revision as of 10:37, 9 November 2014

Double buffering is not difficult. The theory isn't difficult, the code isn't difficult, and it's amazingly easy to use. I fail to see why this has three blocks. JackScott 23:25, 10 April 2009 (UTC)Reply[reply]

I originally put that rating on it not really because of the difficulty, but more because of the fact that it's not something programmers would implement when they're only just starting out. Anyhow, you can change the difficulty rating to whatever you like, I just put it there because it had to have something. -- Creature 11:39, 11 April 2009 (UTC + 1)

A thing in the next to last paragraph in the page, the stuff about 'Invalidated rectangles' got me thinking a little... Isn't that practically the same as keeping track of the maximum and minimum pixel coordinates (x,y) you have modified? Which in turn would mean that you have the coordinates for the rectangle which needs to be updated, and don't have to repaint the rest of the screen? Sounds like something that many might find useful and which wouldn't be too hard to code, so my question is, shall I sit down and write a C code snippet for it? Or maybe someone already has an appropriate snippet? --Teodor väänänen 16:47, 12 July 2009 (UTC)Reply[reply]

C/C++ examples

Is there really a need for two almost identical pieces of code just to show off reinterpret_cast and the new-operator? If you're writing an OS in C++, you should be familiar with these two anyway. --Darkinsanity 19:17, 8 November 2014 (CST)

Besides being redundant, it also makes the glaring error of using bits per pixel instead of bytes per pixel. I'll clean it up - Combuster 04:37, 9 November 2014 (CST)