Skip to main content

Windows Dev Center

What's new in Direct2D

Here are some of the new additions to Direct2D.

What's new for Windows 10

The following features and APIs were added or updated for Windows 10.

Gradient meshes

Starting in Windows 10, Direct2D provides a new primitive for gradient meshes. Gradient meshes are often used by professional illustrators in graphic design software, and they allow artists to render complex (even photo-realistic) multicolored shapes with all the memory and scalability benefits of vectors. For more information, see the follow topics:

Improved image loading APIs

Starting with Windows 10, Direct2D offers a new API for loading images, ID2D1ImageSource. The image source improves upon existing image loading APIs including CreateBitmapFromWicBitmap, the Bitmap Source effect, and the YCbCr effect. The Direct2D image source combines the capabilities of these APIs with support for arbitrarily large images, easy integration with printing and effects, and numerous optimizations including YCbCr JPEG and indexed JPEG. For more information, see these topics:

Improved support for ink rendering

Starting in Windows 10, Direct2D provides a new primitive to represent ink strokes. Direct2D ink strokes are defined by Bezier curves, support different nib shapes and transforms, and may have fixed or variable thickness. Direct2D’s built-in support for ink strokes allows apps to easily render faster, more beautiful ink than previous approaches, which typically required apps to manage ink themselves, as a series of ellipses and quadrilaterals. For more information, see the following topics:

Effect shader linking

Direct2D effects are implemented using HLSL pixel, vertex, and/or compute shaders. Starting with Windows 10, Direct2D now automatically analyzes effect graphs for opportunities to combine and execute individual shaders together. This can provide a significant increase in effect throughput. Consumers of built-in effects do not need to do anything to benefit from effect shader linking, but developers who build their own custom effects should follow updated best practices for leveraging effect shader linking. For more information, see the following topics:

Effect shader linking is designed to not affect the visual output of effects. However, this is not always possible due to specific behavior around effect precision and numerical clipping. For more information on how to control for these behaviors, see:

New built-in effects

Starting with Windows 10, Direct2D includes a rich set of new built-in effects which address top developer requests and enable new kinds of visual scenarios. The new effects are:

Color:

Photo:

Filter:

Stylize:

Transparency:

The straighten, saturation, contrast, highlights and shadows, and temperature and tint effects are demonstrated in the Direct2D Photo Adjustment SDK sample.

What's new for Windows 8.1

The following features and APIs were added or updated for Windows 8.1.

Starting with Windows 8.1, Direct2D is built on top of Direct3D 11.2.

Geometry realizations

Starting in Windows 8.1, Direct2D offers geometry realizations. Geometry realizations allow applications to improve geometry rendering performance in certain situations, without some of the drawbacks of rasterizing geometry to a bitmap. For more information, see the following topics:

Support for JPEG YCbCr images

Starting in Windows 8.1, Direct2D provides support for rendering image data in the JPEG Y’CbCr format. Apps can render JPEG content in its native Y’CbCr representation instead of decompressing to BGRA. This can significantly reduce graphics memory consumption and resource creation time. For more information, see the following topics:

Support for block compressed formats (DDS files)

Starting in Windows 8.1, Direct2D provides support for bitmaps that contain DXGI_FORMAT_BC1_UNORM, DXGI_FORMAT_BC2_UNORM, and DXGI_FORMAT_BC3_UNORM pixel data. Apps can replace their image assets with block compressed DDS images. This can significantly reduce graphics memory consumption and resource creation time. For more information, see the following topics:

Rendering priority

Starting in Windows 8.1, Direct2D provides support for per-device rendering priority. This new feature allows apps to switch a device between normal rendering priority (the default) and low rendering priority (in which the device will not block other rendering tasks on the system). It is recommended that apps use low rendering priority for tasks that are not critical to user-responsiveness, such as pre-rendering content, rendering while minimized, and other operations that are typically performed in the background. For more information, see the following topics:

What's new for Windows 8

The following features and APIs were added or updated for Windows 8.

The new Direct2D interfaces are supported on Windows 7 with the Platform Update for Windows 7 installed.

Direct2D's semantics for devices and device contexts have been updated to more closely resemble the semantics used by Direct3D, and to provide concise operation on Windows Store apps. See Devices and device contexts for more info.

Selected related APIs:

The command list API allows you to share the rendering path for on screen rendering and printing. It also allows you to use primitives to create an image brush for filling primitives.

Selected related APIs:

Direct2D effects is a set of APIs, new in Windows 8, for applying high quality effects to images. It also includes APIs that allow you to make your own custom effects.

Selected related APIs:

Starting with Windows 8, Direct2D includes additional APIs for building multithreaded apps. See Multithreaded Direct2D Apps for more info.

Selected related APIs: