Sign in with
Sign up | Sign in

Tom2D: Rectangles

Part 2: 2D, Acceleration, And Windows: Aren't All Graphics Cards Equal?
By , Igor Wallossek

Rectangles are another key part of our test suite.

Rectangle benchmarkRectangle benchmark

Test Content:

We draw a total of 200,000 rectangles of random size, color, and position in this test. Line and fill colors are always the same. As in other tests, the random seed is constant so that all test runs should produce the same content. And again, all rectangles appear within the display area to make clipping unnecessary.

GDI Functions Called

Rectangles rendered directly:

CreatePen
CreateSolidBrush
Rectangle
SelectObject
DeleteObject

Rectangles rendered from the DIB buffer:

CreateCompatibleDC
CreateDIBSection
BitBlt

Summary

Drawing rectangles using GDI isn’t exactly fast. Nearly all graphics cards run noticeably faster in this test when Aero is turned off, much to our amazement. It’s also noteworthy that all of our graphics cards, regardless of vendor, slow down drastically in buffered mode.

React To This Article