diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2021-01-10 22:46:13 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2021-01-10 22:46:13 +0000 |
| commit | 18c0c9dea9ff73f1526473aacb85f9a6bb272b13 (patch) | |
| tree | 32e20e80f2ad8fb0f6798bfb6092e3239263674b /TextureLoader/interface | |
| parent | Minor fix in GLTF resource manager (diff) | |
| download | DiligentTools-18c0c9dea9ff73f1526473aacb85f9a6bb272b13.tar.gz DiligentTools-18c0c9dea9ff73f1526473aacb85f9a6bb272b13.zip | |
GLTF loader: reworked initial texture data to be stored as user data in the texture/allocation to make sure that GPU data is always initialized before the first use
Diffstat (limited to 'TextureLoader/interface')
| -rw-r--r-- | TextureLoader/interface/TextureLoader.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/TextureLoader/interface/TextureLoader.h b/TextureLoader/interface/TextureLoader.h index 72b0ebe..ebe81b4 100644 --- a/TextureLoader/interface/TextureLoader.h +++ b/TextureLoader/interface/TextureLoader.h @@ -104,11 +104,13 @@ void DILIGENT_GLOBAL_FUNCTION(CreateTextureFromImage)(struct Image* /// Creates a texture from DDS data blob -/// \param [in] pDDSData - Pointer to the DDS data blob +/// \param [in] pDDSData - Pointer to DDS data +/// \param [in] DataSize - DDS data size /// \param [in] TexLoadInfo - Texture loading information -/// \param [in] pDevice - Render device that will be used to create the texture -/// \param [out] ppTexture - Memory location where pointer to the created texture will be stored -void DILIGENT_GLOBAL_FUNCTION(CreateTextureFromDDS)(IDataBlob* pDDSData, +/// \param [in] pDevice - Render device that will be used to create the texture +/// \param [out] ppTexture - Memory location where pointer to the created texture will be stored +void DILIGENT_GLOBAL_FUNCTION(CreateTextureFromDDS)(const void* pDDSData, + size_t DataSize, const TextureLoadInfo REF TexLoadInfo, IRenderDevice* pDevice, ITexture** ppTexture); @@ -116,11 +118,13 @@ void DILIGENT_GLOBAL_FUNCTION(CreateTextureFromDDS)(IDataBlob* pD /// Creates a texture from KTX data blob -/// \param [in] pKTXData - Pointer to the KTX data blob +/// \param [in] pKTXData - Pointer to KTX data +/// \param [in] DataSize - KTX data size /// \param [in] TexLoadInfo - Texture loading information /// \param [in] pDevice - Render device that will be used to create the texture /// \param [out] ppTexture - Memory location where pointer to the created texture will be stored -void DILIGENT_GLOBAL_FUNCTION(CreateTextureFromKTX)(IDataBlob* pKTXData, +void DILIGENT_GLOBAL_FUNCTION(CreateTextureFromKTX)(const void* pKTXData, + size_t DataSize, const TextureLoadInfo REF TexLoadInfo, IRenderDevice* pDevice, ITexture** ppTexture); |
