Jump to content
  • Advertisement
Sign in to follow this  
karnaltaB

SharpDX/Direct2D : How to create brushes from DeviceContext ?

This topic is 625 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!