Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Game Development Kit (GDK) Support #319

Open
ShadowMarker789 opened this issue Jul 19, 2022 · 2 comments
Open

Microsoft Game Development Kit (GDK) Support #319

ShadowMarker789 opened this issue Jul 19, 2022 · 2 comments
Labels
help wanted An issue where a contribution would be appreciated. proposal An issue that represents a proposed feature or change to the repo.

Comments

@ShadowMarker789
Copy link

Description

The Microsoft GDK contains very useful functionality that may be desirable to call from a .Net context.

Rationale

Examples of useful functionality can be such as GameInput where Microsoft Documentation says:

GameInput is the recommended API for all new code, regardless of the target platform, because it provides support across all Microsoft platforms (including earlier versions of Windows), and provides superior performance versus legacy APIs.

Proposed API

Perhaps an additional namespace sub-layer, TerraFX.Interop.Windows.Gdk as the namespace for these types, breaking down into various categories.

E.g.: IGameInput GetNextReading Could be accessed via TerraFX.Interop.Windows.Gdk.GameInput.GetNextReading with GameInput being the class that exposes the set of static methods. This is a lot of namespaces deep, but is that warranted?

Drawbacks

The GDK is iteratively being released, and may still be actively worked on. There might be quarterly releases of the GDK, I don't know how the GDK release schedule affects C# support for it.

Alternatives

The GDK functionality is a

functional superset of all legacy ... APIs

E.g.: XInput can be used to communicate with Xbox-style dual-axis gamepads, Windows.Gaming.Input can be used to communicate with other kinds of devices in C# if the Windows version minimum is met, and DirectInput should just-work as it did before.

Other thoughts

Are the header files available (e.g.: GameInput.h ) for porting regarding licensing requirements and restrictions?

Discussions (optional)

TBA/TBD

@ShadowMarker789 ShadowMarker789 added proposal An issue that represents a proposed feature or change to the repo. untriaged An issue that has not been triaged by the repo maintainers. labels Jul 19, 2022
@rickbrew
Copy link
Contributor

This might be best done as a separate package, especially since the GDK is on a different release schedule than the Windows SDK (at least I assume it is). Totally doable using ClangSharpPInvokeGenerator.

@tannergooding tannergooding added help wanted An issue where a contribution would be appreciated. and removed untriaged An issue that has not been triaged by the repo maintainers. labels Jul 20, 2022
@tannergooding
Copy link
Member

Not sure yet on if new package is better or worse but this something that I'd like to provide.

DirectX is technically "off cadence" now as well with the "Agility SDK".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted An issue where a contribution would be appreciated. proposal An issue that represents a proposed feature or change to the repo.
Projects
None yet
Development

No branches or pull requests

3 participants