VOOZH about

URL: https://www.nuget.org/packages/Hexa.NET.DirectXTex/

⇱ NuGet Gallery | Hexa.NET.DirectXTex 2.0.4




Hexa.NET.DirectXTex 2.0.4

Prefix Reserved
dotnet add package Hexa.NET.DirectXTex --version 2.0.4
 
 
NuGet\Install-Package Hexa.NET.DirectXTex -Version 2.0.4
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hexa.NET.DirectXTex" Version="2.0.4" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hexa.NET.DirectXTex" Version="2.0.4" />
 
Directory.Packages.props
<PackageReference Include="Hexa.NET.DirectXTex" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hexa.NET.DirectXTex --version 2.0.4
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Hexa.NET.DirectXTex, 2.0.4"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Hexa.NET.DirectXTex@2.0.4
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hexa.NET.DirectXTex&version=2.0.4
 
Install as a Cake Addin
#tool nuget:?package=Hexa.NET.DirectXTex&version=2.0.4
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 is compatible.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 is compatible. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Hexa.NET.DirectXTex:

Package Downloads
Hexa.NET.KittyUI

A Cross-Platform UI-Framework build upon ImGui, simplifying ImGui management in C#.

RFGM.Formats

Package Description

Fahrenheit

The mod framework for the Final Fantasy X/X-2 HD Remasters.

HexaEngine.D3D11

Direct3D 11 rendering module for HexaEngine. Implements rendering backend, resource management and shader integration for D3D11-based platforms.

TextureCompressor.Codecs.DirectXTex

DirectXTex adapter for TextureCompressor texture encoding and decoding.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Hexa.NET.DirectXTex:

Repository Stars
vawser/Smithbox
Smithbox is a modding tool for Elden Ring, Armored Core VI, Sekiro, Dark Souls 3, Dark Souls 2, Dark Souls, Bloodborne and Demon's Souls.
amerkoleci/alimer
Cross-platform .NET 10 C# game engine.
HexaEngine/HexaEngine
The official repo of the HexaEngine game engine
Version Downloads Last Updated
2.0.4 4,040 12/8/2024
2.0.3 722 11/13/2024
2.0.2 383 11/3/2024
2.0.1 403 10/28/2024
2.0.0 376 8/4/2024
1.0.2 203 7/25/2024
1.0.1 270 7/7/2024
1.0.0 402 6/24/2024