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

Missing legacy DDraw/D3D functions #54

Closed RibShark closed 3 months ago

RibShark commented 3 months ago

As of https://github.com/smourier/DirectN/commit/4c6c522a38b0da03f6dc79bcdfcea47508dc20e5, a lot of legacy functions such as DirectDrawCreate are missing. My use case for these is for creating configuration programs for old games that use these APIs. It would be nice to have these functions in DirectN so that I do not need to manually define them (the respective interfaces and such are already included in DirectN).

smourier commented 3 months ago

DirectDraw is clearly not a first target for DirectN, plus the problem with it is the SDK header files are very old (they are not annoted) so how interfaces are generated may not always be correct.

However, I've added 7 functions in this commit https://github.com/smourier/DirectN/commit/b564245135b6e12854a3431169fe03b802e4451c

You can see if you can work with it.

PS: if you work with .NET 8 (and possibly AOT), you can check this new project https://github.com/smourier/DirectNAot which already defines ddraw functions. The project is less stable as I'm working on it currently