Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 04 Mar 2011
Offline Last Active Today, 03:23 PM

Posts I've Made

In Topic: Time to decide on a UI Framework (SharpDX)

Today, 02:48 PM

Ok, I finally got my scene to render with WPF using the SharpDX.WPF library, and the results are not usable. It might work if your 3D scene is very simple, but you aren't using a swap chain, and the result when your framerate is too slow is that you get a random splattering of screens is various stages of completion.


It looks like mixing DirectX with XAML is a Windows 8+ only thing.


I don't know what to do.

In Topic: Stream Leaks in SharpDX

18 April 2015 - 06:20 PM

Well for what I'm doing, I wasn't really worried about efficiency at the moment.  I just wanted to get it to stop crashing in the simplest way possible.  So now I gave the buffer its own using, and that fixed it.


Be aware that that isn't the proper way to do it. Doing it right is rather easy and a habit well worth getting into.

In Topic: Stream Leaks in SharpDX

18 April 2015 - 02:49 PM

buffer = new Buffer...


You're creating a new buffer every frame. Use map and unmap instead. You want to create a buffer on the GPU, and reuse that every frame.

In Topic: Time to decide on a UI Framework (SharpDX)

17 April 2015 - 07:16 AM

So I messed around with XAML last night, and it took me about ten minutes to throw together all the things I would need for a functional game UI. I friggen love it! Now I just need to put my dx rendertarget in there without killing my framerate too bad. I'm currently rendering to a SharpDX RenderForm, so hopefully WPF won't be a big step backwards from Windows Forms. I found this library https://sharpdxwpf.codeplex.com/ that will hopefully help out in that regard. I guess that it shares the dx11 render target with a dx9 one that WPF can use.


We'll see how it goes.


EDIT: Not going well. I tried to update SharpDX.WPF and it's samples to the latest SharpDX version and I broke it! It worked initially, but when I updated the nuget package the sample app no longer draws anything. The render target clears to the right color, but no geometry is drawn. Dang. I was hoping I wouldn't have to understand the whole library but I guess I will.

In Topic: Stream Leaks in SharpDX

16 April 2015 - 01:27 PM

Now that I think about it, I think I'm using DataStream for initializing buffers, but DataBox to map /unmap the dynamic ones, maybe that's why I didn't run into obvious problems.


I get the feeling from your posts that you are migrating from DX9 to DX11. Let me tell you that the change is not-at-all trivial. I was pretty comfortable with DX9 and though I'm just an amateur in any case, it took me a whole year to get that comfortable with DX11. They are so different from one another you almost have to forget what you know. Maybe you should put your project aside and implement some DX11 tutorials in SharpDX. Everything is different in DX11.