Sign in to follow this  
karnaltaB

SharpDX/Direct2D : How to create brushes from DeviceContext ?

Recommended Posts

Hi all,

 

According Microsoft MSDN, it's a better practice to draw using Direct2D with a ID2D1DeviceContext (and a D3D Swapchain) than using an ID2D1RenderTarget. You have access to some caching methods, can switch render target anytime, ...

 

So I am trying to adapt my application that way (with SharpDX) but I can't find the constructor to create a SolidColorBrush (or gradiant, ..) from a DeviceContext. They all require a RenterTarget as parameter... I have found some code sample in SharpDX where people construct a new brush with a DeviceContext as parameter, so this contructor was there at a time.

 

Where it's gone ? How do I do now to create my brushes if I use the DeviceContext draw method ?

 

Thank a lot for help, it's really getting me mad :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this