While this the last couple of paragraphs in our part 1 of the Sharky Extreme "3D Guide" might not appeal to everyone we're still going to present you with the formula to calculate just how much memory any given resolution may require, and also, texture sizes.
The formula goes like this (for 2D):
Screen X * Screen Y * Bpp * Number of Buffers / 8 (to get the value in bytes instead of bits) = Memory required
Ie.
1024 * 768 * 32bit * 2 (double buffered output) / 8 = 6 291 456 bytes ~ 6Mb
When entering the realm of 3D rendering things get a bit more complicated, first off we have to add the Z-buffer which depending on it's depth will have a certain effect on the memory required. This is where things can get tricky as in some cases the Z-buffer isn't the same depth as the Screen Buffer, for example the Matrox G200 can render in 32bit but uses a 24bit Z-buffer at best. To make things simple let's just do it like this:
First do the normal calculation as outlined above, then use this formula to calculate Z-buffer usage.
Screen X * Screen Y * Z-depth / 8 = Memory required for Z-buffer
Ie.
1024 * 768 * 24 / 8 = 2 359 269 ~2.25Mb
So, the G200 rendering with 24bit Z-buffering and 32bpp at 1024 x 768 would require a total of 8.25Mb of frame buffer memory.
For textures you'd use this:
X * Y * Bpp / 8 = Texture size in kilobytes
Ie.
256 * 256 * 16 / 8 = 128Kb
Or
2048 * 2048 * 16 / 8 = 8Mb
That does it for part 1 of the Sharky Extreme "3D Guide", until the next installment, have fun and try and remember about your Z Buffer when playing games.
