aboutsummaryrefslogtreecommitdiff
path: root/include/cru/win/native
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/win/native')
-rw-r--r--include/cru/win/native/exception.hpp1
-rw-r--r--include/cru/win/native/window_render_target.hpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/cru/win/native/exception.hpp b/include/cru/win/native/exception.hpp
index 637f021d..ac15ab2d 100644
--- a/include/cru/win/native/exception.hpp
+++ b/include/cru/win/native/exception.hpp
@@ -3,4 +3,5 @@
namespace cru::platform::native::win {
using platform::win::Win32Error;
+using platform::win::HResultError;
} // namespace cru::platform::native::win
diff --git a/include/cru/win/native/window_render_target.hpp b/include/cru/win/native/window_render_target.hpp
index 248bfc25..ab1d68ef 100644
--- a/include/cru/win/native/window_render_target.hpp
+++ b/include/cru/win/native/window_render_target.hpp
@@ -24,8 +24,7 @@ class WindowRenderTarget : public Object {
return factory_;
}
- // Get the target bitmap which can be set as the ID2D1DeviceContext's target.
- ID2D1Bitmap1* GetTargetBitmap() const { return target_bitmap_.Get(); }
+ ID2D1DeviceContext* GetD2D1DeviceContext() { return d2d1_device_context_.Get(); }
// Resize the underlying buffer.
void ResizeBuffer(int width, int height);
@@ -41,6 +40,7 @@ class WindowRenderTarget : public Object {
private:
graph::win::direct::DirectGraphFactory* factory_;
+ Microsoft::WRL::ComPtr<ID2D1DeviceContext> d2d1_device_context_;
Microsoft::WRL::ComPtr<IDXGISwapChain1> dxgi_swap_chain_;
Microsoft::WRL::ComPtr<ID2D1Bitmap1> target_bitmap_;
};