Why have you stopped the work?

Sep 12, 2012 at 10:55 PM

There is a lack of good wpf controls for direc3d rendering. Though SharpDX is growing side by side with DirectX itself.

Coordinator
Sep 13, 2012 at 4:20 PM

It took me a lot of effort to port the terrain rendering from C++ to C# and it kind of impeded my learning and demotivated me!.. :/

And, I didn't have much feedback so far!!
but hey thanks, that might give me the motivation to do some more work on it now! ;)
but it will be my own samples this time! (Porting complex sample was very unrewarding and tedious...)

 

And also, despite my best effort, I couldn't:
 - get rid of the flickering while resizing the DX Control
 - use Direct2D with anything else than D3D10
 - Can't remember now, but I had some D3D version frustration..
maybe something like only D3D9 was only safe bet (sometimes I couldn't check properly whether the system supported 10 or 11) but only D3D10 has D2D support and only D3D11 had nice and easy downgrade of functionality, "server rendering" support (without graphics card) and a few other great functionality

(Plus I had health and energy issue for a long while.. getting better now but...)

I'm doing some DirectX experiment again just now!! But in C++ under Windows 8, much easier as all sample code just work out of the box!
And D3D11 + D2D work together and API is very nice 

Sep 13, 2012 at 9:25 PM
Edited Sep 13, 2012 at 9:26 PM

Have you seen WPF example with SharpDX? http://code.google.com/p/sharpdx/source/browse/#git%2FSamples%2FDirect3D10%2FWPFHost

Coordinator
Sep 14, 2012 at 5:42 AM
Edited Sep 14, 2012 at 5:42 AM

Well, last I look it was 1 1/2 year ago... there was one, I used it at a starting point.

The sample might have improved since then, dunno?!

I might do some clean up and have a new look this weekend! ;)

Coordinator
Sep 14, 2012 at 5:44 AM
Edited Sep 14, 2012 at 5:44 AM

Hey, just had a look! I recognized some of this code as mine! :P

Original version was a bit hackish of Image class... (instead of an ImageSource subclass like I did!)

Sep 23, 2012 at 11:00 AM

Found a Direct2D sample with a nice workaround for the flickering ;-)
Maybe this is of some use.

Coordinator
Sep 24, 2012 at 4:24 AM

Thanks Tibel, I'll take a look at it soon!!
Right now I'm in the middle of a Windows 8  home training! ;)

Sep 29, 2012 at 12:14 PM

Well, do you think it makes sense to do on with this WPF/SharpDX way or is it better so switch to Win8 XAML? I am now on the way porting this project to SharpDX 2.3.0 since there are some issues such that it does not compile. But I am asking my self if it is not a waste of time - maybe just move on to Win8-XAML? I have tried it, but I have a problem with this Metro-Kind apps. I would like to have an application which still runs in a classic window - is it possible with the Win8-XAML way? 

Anyway, since I have time constraints and can't effort to experiment around but have to move on, I will port this project to SharpDX 2.3.0 and use it for the first. My app has to run soon, but this is just a demo, I can exchange the GUI later on anyway. 

Would appreciate any answer from you. P.

Coordinator
Sep 29, 2012 at 3:19 PM

I think it's the path of least resistance to use DirectX in Windows in C++, it will be easily mix and match with a XAML (either in C# or C++ too) UI.

C++/CX is slightly more difficult than C++ CLI to use (see below) but it's high performance interop. And you will probably find that keeping your C++ code as is and add a thing C#/XAML layer is not that difficult.

C++/CX has some quirks though, be warned. All public (i.e. shared accross ABI) C++ class must be sealed (not deep hierarchy)(save for UIElements). Also can't have any public/protected native interfaces (directX interfaces) and a few other annoying thing like that.

But overall it will be relatively easier than porting everything to C#.

Oct 1, 2012 at 10:44 AM
Edited Oct 1, 2012 at 12:08 PM

Lloyd,
is it fine with you if I would release a new version of your Sharp.DX
project (ported to SharpDX 2.3.0) for further usage? There are plans of
integration of SharpDX into the HelixToolkit
(http://helixtoolkit.codeplex.com/) and the Sharp.DX project is a good
staring point.

regards
Przem


On 29.09.2012 16:19, lloyd wrote:
> From: lloyd
>
> I think it's the path of least resistance to use DirectX in Windows in
> C++, it will be easily mix and match with a XAML (either in C# or C++
> too) UI.
>
> C++/CX is slightly more difficult than C++ CLI to use (see below) but
> it's high performance interop. And you will probably find that keeping
> your C++ code as is and add a thing C#/XAML layer is not that difficult.
>
> C++/CX has some quirks though, be warned. All public (i.e. shared
> accross ABI) C++ class must be sealed (not deep hierarchy)(save for
> UIElements). Also can't have any public/protected native interfaces
> (directX interfaces) and a few other annoying thing like that.
>
> But overall it will be relatively easier than porting everything to C#.
>

Coordinator
Oct 1, 2012 at 11:00 AM

It is absolutely fine by me, go ahead!
And I'm glad someone appreciate my small contribution to DirectX and WPF! :) 

This Helixtoolkit looks nice, BTW! :)

Oct 2, 2012 at 10:25 PM

Alright, there is a newer version which supports SharpDX 2.3.x at: http://sharpdxwpf.codeplex.com/