D3DX11Create*From* Sample
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-graphics
Research direction
Start by reviewing the DirectXTex sample structure and comparing the four listed D3DX11CreateFromFile and D3DX11CreateFromMemory operations with the existing DirectXTex capabilities. Done means a utility demonstrates the equivalent synchronous texture and shader-resource-view workflows, including the listed load options, while excluding ThreadPump asynchronous loading.
Written by the indexing model from the issue text.
Description
There's no directly equivalent DirectXTex function to the legacy D3DX11 functions D3DX11CreateTextureFromFile, D3DX11CreateShaderResourceViewFromFile, D3DX11CreateTextureFromMemory, and D3DX11CreateShaderResourceViewFromMemory. The same operations can be performed by DirectXTex, and generally these old functions are total overkill for most users.
However, a utility that demonstrates how to implement all the old 'full-fat' functionality' could be useful for porting as well as be a good sample of how to use DirectXTex in complex ways (rather than just texconv/texassemble).
Note that I won't be implementing the "ThreadPump" async loader behavior that is tied into some D3DX11 only tech
typedef enum D3DX11_FILTER_FLAG {
D3DX11_FILTER_NONE = (1 << 0),
D3DX11_FILTER_POINT = (2 << 0),
D3DX11_FILTER_LINEAR = (3 << 0),
D3DX11_FILTER_TRIANGLE = (4 << 0),
D3DX11_FILTER_BOX = (5 << 0),
D3DX11_FILTER_MIRROR_U = (1 << 16),
D3DX11_FILTER_MIRROR_V = (2 << 16),
D3DX11_FILTER_MIRROR_W = (4 << 16),
D3DX11_FILTER_MIRROR = (7 << 16),
D3DX11_FILTER_DITHER = (1 << 19),
D3DX11_FILTER_DITHER_DIFFUSION = (2 << 19),
D3DX11_FILTER_SRGB_IN = (1 << 21),
D3DX11_FILTER_SRGB_OUT = (2 << 21),
D3DX11_FILTER_SRGB = (3 << 21)
} D3DX11_FILTER_FLAG, *LPD3DX11_FILTER_FLAG;
typedef struct D3DX11_IMAGE_LOAD_INFO {
UINT Width;
UINT Height;
UINT Depth;
UINT FirstMipLevel;
UINT MipLevels;
D3D11_USAGE Usage;
UINT BindFlags;
UINT CpuAccessFlags;
UINT MiscFlags;
DXGI_FORMAT Format;
UINT Filter;
UINT MipFilter;
D3DX11_IMAGE_INFO *pSrcInfo;
} D3DX11_IMAGE_LOAD_INFO, *LPD3DX11_IMAGE_LOAD_INFO;
HRESULT D3DX11CreateTextureFromFile(
_In_ ID3D11Device *pDevice,
_In_ LPCTSTR pSrcFile,
_In_ D3DX11_IMAGE_LOAD_INFO *pLoadInfo,
_Out_ ID3D11Resource **ppTexture
);
HRESULT D3DX11CreateTextureFromMemory(
_In_ ID3D11Device *pDevice,
_In_ LPCVOID pSrcData,
_In_ SIZE_T SrcDataSize,
_In_ D3DX11_IMAGE_LOAD_INFO *pLoadInfo,
_Out_ ID3D11Resource **ppTexture
);
HRESULT D3DX11CreateShaderResourceViewFromFile(
_In_ ID3D11Device *pDevice,
_In_ LPCTSTR pSrcFile,
_In_ D3DX11_IMAGE_LOAD_INFO *pLoadInfo,
_Out_ ID3D11ShaderResourceView **ppShaderResourceView
);
HRESULT D3DX11CreateShaderResourceViewFromMemory(
_In_ ID3D11Device *pDevice,
_In_ LPCVOID pSrcData,
_In_ SIZE_T SrcDataSize,
_In_ D3DX11_IMAGE_LOAD_INFO *pLoadInfo,
_Out_ ID3D11ShaderResourceView **ppShaderResourceView
);
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 498
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DirectXTex
-
question
Difficulty 4/5 3-5 days Newbie friendliness 30/100
microsoft/DirectXTex#734 · 8 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/DirectXTex#729 ·
-
exr
Difficulty 3/5 1-2 days Newbie friendliness 55/100
microsoft/DirectXTex#724 · 2 comments ·
-
Project feedback Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
microsoft/DirectXTex#719 · 2 reactions ·
-
tools
Difficulty 5/5 Over a week Newbie friendliness 30/100
microsoft/DirectXTex#717 ·
All issues in microsoft/DirectXTex
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100