Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 278
Axel Gneiting Avatar asked Nov 07 '12 21:11

Axel Gneiting


1 Answers

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).

like image 107
0xC0000022L Avatar answered Sep 30 '22 17:09

0xC0000022L