Storing Bitmaps in Display Memory
Blitting from display memory to display memory is usually much more efficient than blitting from system memory to display memory. As a result, you should store as many of the sprites your application uses as possible in display memory.
Most display adapter hardware contains enough extra memory to store more than the primary surface and the back buffer.
Call the IDirectDraw::GetAvailableVidMem method to determine the amount of total and available memory for storing bitmaps in the display adapter's memory.
After the call, the lpdwTotal parameter contains the total amount of display memory, minus the primary surface and any private caches held by driver, and lpdwFree contains the amount of display memory currently free that can be allocated for a surface that matches the capabilities specified by the structure at lpDDSCaps.
Send Feedback on this topic to the authors