aboutsummaryrefslogtreecommitdiff
path: root/include/cru/win/graphics/direct/Factory.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/win/graphics/direct/Factory.hpp')
-rw-r--r--include/cru/win/graphics/direct/Factory.hpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/cru/win/graphics/direct/Factory.hpp b/include/cru/win/graphics/direct/Factory.hpp
index ffa8c764..ba504f0d 100644
--- a/include/cru/win/graphics/direct/Factory.hpp
+++ b/include/cru/win/graphics/direct/Factory.hpp
@@ -20,8 +20,8 @@ class CRU_WIN_GRAPHICS_DIRECT_API DirectGraphicsFactory
public:
ID3D11Device* GetD3D11Device() const { return d3d11_device_.Get(); }
- ID2D1Factory1* GetD2D1Factory() const { return d2d1_factory_.Get(); }
- ID2D1Device* GetD2D1Device() const { return d2d1_device_.Get(); }
+ ID2D1Factory2* GetD2D1Factory() const { return d2d1_factory_.Get(); }
+ ID2D1Device1* GetD2D1Device() const { return d2d1_device_.Get(); }
IDXGIFactory2* GetDxgiFactory() const { return dxgi_factory_.Get(); }
IDWriteFactory* GetDWriteFactory() const { return dwrite_factory_.Get(); }
IDWriteFontCollection* GetSystemFontCollection() const {
@@ -29,7 +29,7 @@ class CRU_WIN_GRAPHICS_DIRECT_API DirectGraphicsFactory
}
public:
- Microsoft::WRL::ComPtr<ID2D1DeviceContext> CreateD2D1DeviceContext();
+ Microsoft::WRL::ComPtr<ID2D1DeviceContext1> CreateD2D1DeviceContext();
// This context should only be used to create graphic resources like brush.
// Because graphic resources can be shared if they are created in the same
@@ -53,11 +53,9 @@ class CRU_WIN_GRAPHICS_DIRECT_API DirectGraphicsFactory
private:
Microsoft::WRL::ComPtr<ID3D11Device> d3d11_device_;
- // ID2D1Factory1 is a interface only available in Windows 8 and Windows 7 with
- // update. It is d2d v1.1.
- Microsoft::WRL::ComPtr<ID2D1Factory1> d2d1_factory_;
- Microsoft::WRL::ComPtr<ID2D1Device> d2d1_device_;
- Microsoft::WRL::ComPtr<ID2D1DeviceContext> d2d1_device_context_;
+ Microsoft::WRL::ComPtr<ID2D1Factory2> d2d1_factory_;
+ Microsoft::WRL::ComPtr<ID2D1Device1> d2d1_device_;
+ Microsoft::WRL::ComPtr<ID2D1DeviceContext1> d2d1_device_context_;
Microsoft::WRL::ComPtr<IDXGIFactory2> dxgi_factory_;
Microsoft::WRL::ComPtr<IDWriteFactory> dwrite_factory_;
Microsoft::WRL::ComPtr<IDWriteFontCollection> dwrite_system_font_collection_;