Hexa.NET.DirectXTex.Standalone
2.0.1
Removed Silk dependency from primary nuget package making it universal.
dotnet add package Hexa.NET.DirectXTex.Standalone --version 2.0.1
NuGet\Install-Package Hexa.NET.DirectXTex.Standalone -Version 2.0.1
<PackageReference Include="Hexa.NET.DirectXTex.Standalone" Version="2.0.1" />
paket add Hexa.NET.DirectXTex.Standalone --version 2.0.1
#r "nuget: Hexa.NET.DirectXTex.Standalone, 2.0.1"
// Install Hexa.NET.DirectXTex.Standalone as a Cake Addin #addin nuget:?package=Hexa.NET.DirectXTex.Standalone&version=2.0.1 // Install Hexa.NET.DirectXTex.Standalone as a Cake Tool #tool nuget:?package=Hexa.NET.DirectXTex.Standalone&version=2.0.1
Hexa.NET.DirectXTex
Hexa.NET.DirectXTex is a thin .NET wrapper for the DirectXTex library, providing developers with streamlined access to DirectX texture processing functionalities within .NET applications.
Table of Contents
Introduction
DirectXTex is a comprehensive library for handling texture processing in DirectX applications. Hexa.NET.DirectXTex aims to bridge the gap between .NET developers and the powerful features of DirectXTex by providing a straightforward and user-friendly thin wrapper.
Features
- Load and save a variety of texture formats.
- Support for texture compression and decompression.
- Mipmap generation and management.
- Format conversion and resizing.
- Powerful image processing capabilities.
- Supporting .NET 8.0 and .netstandard 2.0/2.1
Installation
You can install Hexa.NET.DirectXTex via NuGet Package Manager:
Install-Package Hexa.NET.DirectXTex
Or add it to your .csproj file:
<PackageReference Include="Hexa.NET.DirectXTex" Version="2.0.0" />
A standalone version is also available (without depending on Silk)
<PackageReference Include="Hexa.NET.DirectXTex.Standalone" Version="2.0.0" />
Usage
Here's a quick example of how to use Hexa.NET.DirectXTex to load a texture, generate mipmaps, and save it in a different format:
using Hexa.NET.DirectXTex;
public class Program
{
private static unsafe void Main(string[] args)
{
ScratchImage image = DirectXTex.CreateScratchImage();
TexMetadata metadata = default;
string inputPath = "assets/textures/test.dds";
DirectXTex.LoadFromDDSFile(inputPath, DDSFlags.None, ref metadata, image);
ScratchImage mipChain = DirectXTex.CreateScratchImage();
int mipLevels = 4;
DirectXTex.GenerateMipMaps2(image.GetImages(), image.GetImageCount(), ref metadata, TexFilterFlags.Default, (ulong)mipLevels, ref mipChain);
image.Release();
string outputPath = "test.dds";
TexMetadata mipChainMetadata = mipChain.GetMetadata();
DirectXTex.SaveToDDSFile2(mipChain.GetImages(), mipChain.GetImageCount(), ref mipChainMetadata, DDSFlags.None, outputPath);
mipChain.Release();
}
}
API Documentation
The full API documentation is available here. It provides detailed information on all available methods and classes within Hexa.NET.DirectXTex, as it is a thin wrapper around the DirectXTex library.
Contributing
We welcome contributions from the community! If you'd like to contribute, please follow these steps:
Fork the repository.
Create a new branch with a descriptive name.
Make your changes and commit them with clear and concise messages.
Push your changes to your fork.
Submit a pull request.
Please ensure that your code adheres to the project's coding standards and includes appropriate tests.
License
This project is licensed under the MIT License. See the LICENSE file for more information.
Acknowledgements
The DirectXTex library: DirectXTex
The .NET community for their continuous support and contributions.
Feel free to modify as needed!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- HexaGen.Runtime (>= 1.1.13)
- HexaGen.Runtime.COM (>= 1.1.4)
-
.NETStandard 2.1
- HexaGen.Runtime (>= 1.1.13)
- HexaGen.Runtime.COM (>= 1.1.4)
-
net7.0
- HexaGen.Runtime (>= 1.1.13)
- HexaGen.Runtime.COM (>= 1.1.4)
-
net8.0
- HexaGen.Runtime (>= 1.1.13)
- HexaGen.Runtime.COM (>= 1.1.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.