随笔分类 -  Direct2D

日常学习
摘要:当需要设置位图的混合模式时,应该使用ID2D1DeviceContext而不是ID2D1RenderTarget。 代码如下: #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <comdef.h> #include <d2d1.h> 阅读全文
posted @ 2021-02-02 18:02 strive-sun 阅读(650) 评论(0) 推荐(0)
摘要:微软文档:Transforms 本篇通过官方文档学习,整理出来的demo,初始样本请先创建一个普通的desktop app。 ID2D1SolidColorBrush* m_pOriginalShapeBrush, * m_pFillBrush,* m_pTransformedShapeBrush; 阅读全文
posted @ 2021-02-02 17:11 strive-sun 阅读(483) 评论(0) 推荐(0)
摘要:微软文档:Geometries overview 本篇通过官方文档学习,整理出来的demo,初始样本请先创建一个普通的desktop app。 // Test_Direct2D_Brush.cpp : Defines the entry point for the application. // # 阅读全文
posted @ 2021-01-29 17:03 strive-sun 阅读(236) 评论(0) 推荐(0)
摘要:微软文档:Brushes overview 本篇通过官方文档学习,整理出来的demo,初始样本请先创建一个普通的desktop app。 // Test_Direct2D_Brush.cpp : Defines the entry point for the application. // #inc 阅读全文
posted @ 2021-01-21 16:50 strive-sun 阅读(295) 评论(0) 推荐(0)
摘要:在进行D2D学习的时候,发现了这样一篇文档, Direct2D Quickstart for Windows 8 只有这么一小段介绍, Direct2D is a native-code, immediate-mode API for creating 2D graphics. This topic 阅读全文
posted @ 2021-01-15 14:56 strive-sun 阅读(1002) 评论(0) 推荐(1)
摘要:前段时间稍微看了点Direct3D, 觉得挺有意思的,但是想着要有3D得先从2D开始。故开始了D2D旅行。 如标题所示,CreateHwndRenderTarget 是在用来创建一个渲染到窗口的渲染目标。 创建渲染目标并且可以使用硬件加速时,可以在计算机的GPU上分配资源。通过一次创建渲染目标并保留 阅读全文
posted @ 2021-01-15 14:43 strive-sun 阅读(1233) 评论(0) 推荐(0)