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

Thanks! #5

Open
LennardF1989 opened this issue Sep 16, 2023 · 1 comment
Open

Thanks! #5

LennardF1989 opened this issue Sep 16, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@LennardF1989
Copy link

LennardF1989 commented Sep 16, 2023

I needed a version I could easily P/Invoke from C# (.NET 7), thanks! Saves me the trouble.

For those wondering:

[LibraryImport("texconv.dll", EntryPoint = "texconv")]
private static partial int Texconv(
    int argc,
    [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr)] string[] argv,
    [MarshalAs(UnmanagedType.Bool)] bool verbose,
    [MarshalAs(UnmanagedType.Bool)] bool initCOM,
    [MarshalAs(UnmanagedType.Bool)] bool allowSlowCodec,
    [MarshalAs(UnmanagedType.LPWStr)] string errorBuffer,
    int errorBufferSize = 0
);

How truely cross-platform is this, when Texconv itself uses DirectX interfaces for (parts) of its magic?

@matyalatte
Copy link
Owner

matyalatte commented Sep 17, 2023

How truely cross-platform is this, when Texconv itself uses DirectX interfaces for (parts) of its magic?

DirectX team is trying to make it cross-platform. And some features supports unix/linux systems already.
For DirectXTex, you can build it on unix/linux systems just by including DirectXMath and DirectX-Headers.
So, it was not hard to make texconv cross-platform.
I just removed winapi calls and GPU codec from texconv.

@matyalatte matyalatte added the documentation Improvements or additions to documentation label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants