Axel Gneiting
Axel Gneiting

Reputation: 5413

What's the fastest way to draw to a HWND on modern Windows?

When I last did this you would use DirectDraw to blit to a hardware surface, or even directly map it and draw directly.

What is the recommended method to do this today? Use Direct3D 10/11 and do the same?

Edit: To clarify my question, I want to do some software rasterization and therefore need a fast way to blit pixel data directly to the display.

Upvotes: 7

Views: 1035

Answers (1)

0xC0000022L
0xC0000022L

Reputation: 21319

I would suggest to use Direct2D which is meant for desktop applications these days. Quote:

Purpose

Direct2D is a hardware-accelerated, immediate-mode, 2-D graphics API that provides high performance and high-quality rendering for 2-D geometry, bitmaps, and text. The Direct2D API is designed to interoperate well with GDI, GDI+, and Direct3D.

Requirements: Vista and higher as well as the respective server versions (if that is needed).

Upvotes: 3

Related Questions