News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Direct2D Applications

Started by LiaoMi, August 11, 2021, 01:53:28 AM

Previous topic - Next topic

LiaoMi

Hi,

the hot topic of the day is Direct2D Applications  :badgrin:, based on the forum topic http://masm32.com/board/index.php?topic=7000.msg103834#msg103834 (Direct2D_2.zip)

Direct2d Reference - https://docs.microsoft.com/en-us/windows/win32/direct2d/direct2d-portal
Direct2d PDF Reference -https://docs.microsoft.com/en-us/windows/win32/opbuildpdf/direct2d/toc.pdf?branch=live

Mostly C port of Microsoft's Simple Direct2D tutorial - https://github.com/fanc999/d2d-sample-mostly-c and https://github.com/fanc999/d2d-sample-mostly-c/archive/refs/heads/master.zip
Downloadable content of the book "Direct2D programming in a nutshell" - https://github.com/fkhydra/direct2d_nutshell/archive/refs/heads/master.zip

Programming Direct2D – Part 1 - https://www.codeproject.com/Articles/95054/Programming-Direct2D-Part-1
Programming Direct2D – Part 2 – Basic Geometry - https://www.codeproject.com/Articles/112584/Programming-Direct-D-Part-Basic-Geometry

Direct2D Tutorial Part 1: RenderTarget - https://www.codeproject.com/Articles/5269188/Direct2D-Tutorial-Part-1-RenderTarget
Direct2D Tutorial Part 2: Basic Shapes - https://www.codeproject.com/Articles/5277136/Direct2D-Tutorial-Part-2-Basic-Shapes
Direct2D Tutorial Part 3: Affine Transforms - https://www.codeproject.com/Articles/5277139/Direct2D-Tutorial-Part-3-Affine-Transforms
Direct2D Tutorial Part 4: Gradient Brush - https://www.codeproject.com/Articles/5279848/Direct2D-Tutorial-Part-4-Gradient-Brush

Rendering Text with Direct2D & DirectWrite - https://www.codeproject.com/Articles/468340/Rendering-Text-with-Direct2D-DirectWrite

Direct2D: Hardware Acceleration in Windows 7 Plotting - https://www.codeproject.com/Articles/35890/Direct2D-Hardware-Acceleration-in-Windows-7-Plotti (d2d.zip)
GDI+ has many features all right, but it is somewhat slow. Microsoft introduced Direct2D in Windows 7, a featured hardware-accelerated API that you can now use for applications. My first usage of Direct2D was in my Turbo Play project, which without it takes 28ms to draw screen. With it, it takes < 1 ms!
The good thing about Direct2D is that it can be easily combined with GDI, GDI+, or Direct3D.

A Modern Direct2D Color Picker for Plain Win32 - https://www.codeproject.com/Articles/5270027/A-Modern-Direct2D-Color-Picker-for-Plain-Win32
https://github.com/WindowsNT/ColorPicker/archive/refs/heads/master.zip
https://github.com/WindowsNT/ColorPicker