1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-21 12:00:06 +00:00

Put DDSTextureLoader & WICTextureLoader routines into DirectX C++ namespace

This commit is contained in:
walbourn_cp 2012-10-02 14:03:22 -07:00
parent 68680d10ea
commit 051f865120
4 changed files with 59 additions and 53 deletions

View File

@ -1250,12 +1250,12 @@ static HRESULT CreateTextureFromDDS( _In_ ID3D11Device* d3dDevice,
}
//--------------------------------------------------------------------------------------
HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
_In_bytecount_(ddsDataSize) const uint8_t* ddsData,
_In_ size_t ddsDataSize,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize )
HRESULT DirectX::CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
_In_bytecount_(ddsDataSize) const uint8_t* ddsData,
_In_ size_t ddsDataSize,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize )
{
if (!d3dDevice || !ddsData || (!texture && !textureView))
{
@ -1332,12 +1332,12 @@ HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
}
//--------------------------------------------------------------------------------------
HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
_In_z_ const wchar_t* fileName,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize )
{
HRESULT DirectX::CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
_In_z_ const wchar_t* fileName,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize )
{
if (!d3dDevice || !fileName || (!texture && !textureView))
{
return E_INVALIDARG;

View File

@ -29,17 +29,20 @@
#include <stdint.h>
#pragma warning(pop)
HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
_In_bytecount_(ddsDataSize) const uint8_t* ddsData,
_In_ size_t ddsDataSize,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize = 0
);
namespace DirectX
{
HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
_In_bytecount_(ddsDataSize) const uint8_t* ddsData,
_In_ size_t ddsDataSize,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize = 0
);
HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
_In_z_ const wchar_t* szFileName,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize = 0
);
HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
_In_z_ const wchar_t* szFileName,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize = 0
);
}

View File

@ -558,13 +558,13 @@ static HRESULT CreateTextureFromWIC( _In_ ID3D11Device* d3dDevice,
}
//--------------------------------------------------------------------------------------
HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
_In_opt_ ID3D11DeviceContext* d3dContext,
_In_bytecount_(wicDataSize) const uint8_t* wicData,
_In_ size_t wicDataSize,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize
HRESULT DirectX::CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
_In_opt_ ID3D11DeviceContext* d3dContext,
_In_bytecount_(wicDataSize) const uint8_t* wicData,
_In_ size_t wicDataSize,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize
)
{
if (!d3dDevice || !wicData || (!texture && !textureView))
@ -633,12 +633,12 @@ HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
}
//--------------------------------------------------------------------------------------
HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
_In_opt_ ID3D11DeviceContext* d3dContext,
_In_z_ const wchar_t* fileName,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize )
HRESULT DirectX::CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
_In_opt_ ID3D11DeviceContext* d3dContext,
_In_z_ const wchar_t* fileName,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize )
{
if (!d3dDevice || !fileName || (!texture && !textureView))
{

View File

@ -36,19 +36,22 @@
#include <stdint.h>
#pragma warning(pop)
HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
_In_opt_ ID3D11DeviceContext* d3dContext,
_In_bytecount_(wicDataSize) const uint8_t* wicData,
_In_ size_t wicDataSize,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize = 0
);
namespace DirectX
{
HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
_In_opt_ ID3D11DeviceContext* d3dContext,
_In_bytecount_(wicDataSize) const uint8_t* wicData,
_In_ size_t wicDataSize,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize = 0
);
HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
_In_opt_ ID3D11DeviceContext* d3dContext,
_In_z_ const wchar_t* szFileName,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize = 0
);
HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
_In_opt_ ID3D11DeviceContext* d3dContext,
_In_z_ const wchar_t* szFileName,
_Out_opt_ ID3D11Resource** texture,
_Out_opt_ ID3D11ShaderResourceView** textureView,
_In_ size_t maxsize = 0
);
}