DIRECT2D Tutorial (a) direct2d has come, who is the Terminator of GDI?

Source: Internet
Author: User

What is DIRECT2D

Word, a 2D graphics API on the Windows 7 platform, provides high-performance, high-quality 2D rendering. Most people may be unfamiliar with direct2d, so that when I mentioned the word in the forum, someone actually said you were wrong? Maybe everyone is more familiar with Direct3D, because D3D is already the mainstream application of the current game field. In the past, the 3D World was OpenGL and DirectX, but because of the lag in OpenGL development and the lack of a powerful backend pillar like Microsoft, it was gradually overtaken by DirectX. Back to the 2D, the past 2D programs on Windows are also mainly based on GDI and GDI +, unfortunately both are software implementations, and DIRECT2D is different, it is based on Direct3D, so the ability to use hardware acceleration features, to achieve greater performance of hardware features, create high-performing, High-quality 2D graphics that include geometric shapes such as rectangles, ellipses, and so on. There are also bitmaps, text. And more conveniently, direct2d and gdi,gdi+ and D3D can all interact.

Operational requirements

To develop and use the DIRECT2D program, the system must be Windows 7,windows Vista SP2, Windows Server R2 or Windows Server SP2, Such system requirements will undoubtedly slightly hinder the pace of direct2d, although Vista and Windows 7 have been introduced for some time, but there is no denying that there are still many people using the XP system. Even the Win2K. However, the popularization of new technology is unstoppable, I believe that in the near future, DIRECT2D will become the mainstream of the 2D graphics world.

Architecture of the D2D

DIRECT2D is built on the Direct3D 10.1 API, which means that direct2d can use hardware acceleration, which is a diagram of DIRECT2D and Direct3D

As can be seen, DIRECT2D also comes with a software implementation (software rasterizer), because if the video card does not support hardware acceleration, then the direct2d can be rendered using software, even if the effect is better than GDI. In the Direct3D below there is also a layer called DXGI, the full name is: DirectX Graphics infrastructure,dxgi from the Direct3D 10 only began to exist, The main purpose is to separate some work that is unrelated to 3D graphics from the original runtime, many of which are the underlying operations, such as enumerating devices, displaying frame buffers, gamma controls, managing fullscreen, etc., in the previous version of Direct3D 10, All of these operations are integrated into the Direct3D API, which is now separated into a single component, which is dxgi.

Visual effects

With DIRECT2D, you get a better visual effect than GDI, DIRECT2D supports the anti-aliasing effect based on primitives, and it fully supports transparent and alpha blending. is a GDI and direct2d a comparison, you can look at the direct2d of the delicate degree visible.

Interoperability

Direct2D and direct3d,gdi,gdi+ have good interactivity because they all support surface-level operations where surfaces are surface in Direct3D, and in GDI the equivalent of DC (Device Context). In addition DIRECT2D can also be very good support directwrite,directwrite is also a new DirectX feature, mainly used to do text rendering. Is the relationship between these fingers.

Expect

Although DIRECT2D has a clear advantage, but to replace GDI is still not a short time to achieve, in order to maintain backward compatibility, Microsoft will not abandon GDI in a short period of time. Now Direct2D has been born for some time, how much time does GDI have? For the graphics world on the Windows platform, how far is the day of DirectX unified? We wait and see!

DIRECT2D Tutorial (a) direct2d has come, who is the Terminator of GDI?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.