amerkoleci / Vortice.Windows

.NET bindings for Direct3D12, Direct3D11, WIC, Direct2D1, XInput, XAudio, X3DAudio, DXC, Direct3D9 and DirectInput.
MIT License
1.01k stars 73 forks source link

Fix 'All' enum value in RegisterComponentMaskFlags #342

Closed paulbartrum closed 2 years ago

amerkoleci commented 2 years ago

Thanks!

amerkoleci commented 2 years ago

Curious, what are you working at using Vortice?

paulbartrum commented 2 years ago

I'm working on a game: image Still a long way to go :-)

amerkoleci commented 2 years ago

Oh nice, using D3D11 or D3D12? I see you're using ImGui as well

paulbartrum commented 2 years ago

Yep! My current list of package dependencies: Vortice.Direct3D12, Vortice.Dxc, Vortice.XAudio2, Vortice.DirectStorage, Mochi.PhysX, ImGui.NET, K4os.Compression.LZ4, System.CommandLine.

amerkoleci commented 2 years ago

K4os

Mochi.PhysX? How are the performance?

paulbartrum commented 2 years ago

Mochi.PhysX? How are the performance?

Mochi.PhysX is a very low-level mapping (lots of pointers, etc) so performance is presumably good. (Though I haven't done any benchmarking to verify this.) I did try PhysX.Net first before switching to Mochi.PhysX, but I found PhysX.Net was missing some functionality. I think because PhysX.Net is using a hand-written mapping layer whereas Mochi.PhysX is using a tool to automate the C++ -> C# mapping.

amerkoleci commented 2 years ago

Nice, how are the performance of your game ? Compared to native C++?

paulbartrum commented 2 years ago

Nice, how are the performance of your game ? Compared to native C++?

I have no idea. I'm getting 400fps right now (1000fps with full-screen ambient occlusion turned off) so I can't really complain. My gut feeling is that .NET performance is easily good enough to make a commercial game in, as long as you avoid triggering the garbage collector during gameplay. Which with the prevalence of Span is quite doable these days.

amerkoleci commented 2 years ago

You're targeting net6?

paulbartrum commented 2 years ago

.NET 7. I really like the 'required' keyword in C# 11. Edit: and raw string literals are amazing for unit tests.