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

Add functions to support Standard Swizzle textures #515

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ set(LIBRARY_SOURCES
DirectXTex/DirectXTexMipmaps.cpp
DirectXTex/DirectXTexMisc.cpp
DirectXTex/DirectXTexNormalMaps.cpp
DirectXTex/DirectXTexSwizzle.cpp
DirectXTex/DirectXTexPMAlpha.cpp
DirectXTex/DirectXTexResize.cpp
DirectXTex/DirectXTexTGA.cpp
Expand Down
7 changes: 7 additions & 0 deletions DirectXTex/DirectXTex.h
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,13 @@ namespace DirectX
_In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata, _In_ size_t item,
_In_ float alphaReference, _Inout_ ScratchImage& mipChain) noexcept;

HRESULT __cdecl StandardSwizzle(
_In_ const Image& srcImage, _In_ bool toSwizzle,
_Out_ ScratchImage& image) noexcept;
HRESULT __cdecl StandardSwizzle(
_In_reads_(nimages) const Image* srcImages, _In_ size_t nimages, _In_ const TexMetadata& metadata, _In_ bool toSwizzle,
_Out_ ScratchImage& result) noexcept;
// Performs row-major linear <-> z-order curve swizzling

enum TEX_PMALPHA_FLAGS : unsigned long
{
Expand Down
Loading
Loading