From 3800d79e3d5491340e22cbf237ec4b62b75545a2 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 1 Apr 2018 11:32:52 -0700 Subject: Some updates to texture loading routines. Fixed https://github.com/DiligentGraphics/DiligentTools/issues/3 --- TextureLoader/interface/TextureUtilities.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'TextureLoader/interface/TextureUtilities.h') diff --git a/TextureLoader/interface/TextureUtilities.h b/TextureLoader/interface/TextureUtilities.h index ffd9e56..82fbf8d 100644 --- a/TextureLoader/interface/TextureUtilities.h +++ b/TextureLoader/interface/TextureUtilities.h @@ -34,13 +34,26 @@ namespace Diligent { -void CreateImageFromFile( const Diligent::Char *FilePath, +/// Creates an image from file + +/// \param [in] FilePath - Source file path +/// \param [out] ppImage - Memory location where pointer to the created image will be stored +/// \param [out] ppDDSData - If the file is a dds file, this will contain the pointer to the blob +/// containing dds data. This parameter can be null. +void CreateImageFromFile( const Char *FilePath, Image **ppImage, IDataBlob **ppDDSData = nullptr); -void CreateTextureFromFile( const Diligent::Char *FilePath, + +/// Creates a texture from file + +/// \param [in] FilePath - Source file path +/// \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 CreateTextureFromFile( const Char *FilePath, const TextureLoadInfo& TexLoadInfo, - Diligent::IRenderDevice *pDevice, - Diligent::ITexture **ppTexture ); + IRenderDevice *pDevice, + ITexture **ppTexture ); } -- cgit v1.2.3