Direct2D - Printable Version
+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: Ab3d.DXEngine (https://forum.ab4d.com/forumdisplay.php?fid=11)
+--- Thread: Direct2D (/showthread.php?tid=4076)
Direct2D - leonardo - 01-29-2018
It is possible to use Direct2D from DXEngine in a WPF app?
RE: Direct2D - abenedik - 01-29-2018
Hm, what would you like to achieve with Direct2D?
I have no experience with Direct2D, but if it can work with the same DirectX Device objects as Direct3D and can write to RenderTagetView, then it would be possible to use it with DXEngine (probably).
In this case I would recommend you to check the "Customizations\CustomRenderingStep4" sample that comes with Ab3d.DXEngine samples project. This shows you how to add a custom rendering step from where you will be able to execute your own DirectX code.
If you can provide me with some sample Direct2D code and some specific goals that you want to achieve, then I can help you with integration.
RE: Direct2D - leonardo - 01-30-2018
I want to replace some GDI+ code that draw a Bitmap with some modern code Direct2D based. I have to draw points (SetPixel) and closed curves (DrawClosedCurve). I draw sections of a 3d model after a post-processing on an Image control of WPF.
I don't use WPF 2D drawing for performance/aliasing reasons but maybe with Direct2D situation can improve.
I have read that SharpDX support Direct2D so maybe also DXEngine can expose some simple functions to work with it.
RE: Direct2D - abenedik - 01-30-2018
I understand now.
I plan to add support for 2D sprites in the future.
But I do not intend to add support for any other Direct2D functionality.
However, if you already have Ab3d.DXEngine then I think (but I am not sure - have not looked into Direct2D documentation) that you should be able to use DirectX - WPF integration that is already Ab3d.DXEngine for Direct2D or add some Direct2D graphics on top (or below) existing 3D graphics.