smourier / DirectN

Direct interop Code for .NET Framework, .NET Core and .NET 5+ : DXGI, WIC, DirectX 9 to 12, Direct2D, Direct Write, Direct Composition, Media Foundation, WASAPI, CodecAPI, GDI, Spatial Audio, DVD, Windows Media Player, UWP DXInterop, WinUI3, etc.
MIT License
311 stars 28 forks source link

Please add XMFLOAT2! orz #43

Closed vmx17 closed 1 year ago

vmx17 commented 1 year ago

Hi! How are you doing? Not issue but request (as usual). Title says all.
Recently, I hit a question why DirectN does not support XMFLOAT2. I use XMFLOAT3 for position, XMFLOAT4 for color but what is for uv? It should not be Rect of Windows.Foundation nor MF_FLOAT2 of Windows.Win32.... Once I heard DirectXMath is not provided in dlls but you're providing XMFLOAT3 and 4, it is a lacking parts of plastic model kit, isn't it? .... But! Just I've hit an idea to use Vector2,3,4 from System.Numerics.

smourier commented 1 year ago

Hi,

I added XMFLOAT3 and 4 to support the sample (to mimic C++ code). They are just similar arrays of floats so you don't stricly need them, however, I have added XMFLOAT2 as it makes sense :-)

vmx17 commented 1 year ago

I'd like to express my gratitude for it. I'll try it tommorow. What's the secret to make code so fast?