Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D3D11 Device to 2D Context? #52

Open
bestplay9384 opened this issue Jun 15, 2017 · 3 comments
Open

D3D11 Device to 2D Context? #52

bestplay9384 opened this issue Jun 15, 2017 · 3 comments
Labels

Comments

@bestplay9384
Copy link

Hey I wonder if it's possible to get to 2D Context and render elements like in here (https://english.r2d2rigo.es/2012/07/04/basic-direct2d-drawing-with-sharpdx/). In my case i have D3D11Hook from your approach so i have

SharpDX.Direct3D11.Device _device; and
SharpDX.DXGI.SwapChain _swapChain;

Is there any possibility to render in 2D using (or not) DXOverlayEngine via those variables?
Thanks for help! :)

@justinstenning
Copy link
Owner

Yes, you create your own d2d device. The only reason I haven't used that approach here is to support pre windows 8.

@bestplay9384
Copy link
Author

bestplay9384 commented Jun 17, 2017

@spazzarama can you provide any example? And is it necessary to use your Overlay Engine? It would be pretty nice to use some easy drawing functions like DrawLine or DrawCircle, but i haven't seen any tutorial how to do it with SharpDX.Direct3D11, maybe you can tell anything about it? :( Thanks for your time!

@justinstenning
Copy link
Owner

justinstenning commented Jul 8, 2017

@bestplay9384 I use Direct2D in my book samples available here https://github.com/spazzarama/Direct3D-Rendering-Cookbook (specifically in the Common library)

No you do not need to use the overlay engine, although you could create a Direct2D renderer that fits within that framework if you wanted to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants