Quellcode durchsuchen

Removing hasAlpha from bimg::TextureInfo and bimg::imageGetSize

NPatch vor 5 Jahren
Ursprung
Commit
b336e20b9e
2 geänderte Dateien mit 1 neuen und 4 gelöschten Zeilen
  1. 0 2
      include/bimg/bimg.h
  2. 1 2
      src/image.cpp

+ 0 - 2
include/bimg/bimg.h

@@ -174,7 +174,6 @@ namespace bimg
 		uint8_t numMips;            //!< Number of MIP maps.
 		uint8_t bitsPerPixel;       //!< Format bits per pixel.
 		bool    cubeMap;            //!< Texture is cubemap.
-		bool	hasAlpha;			//!< Texture utilizes alpha channel.
 	};
 
 	struct ImageContainer
@@ -274,7 +273,6 @@ namespace bimg
 		, bool _hasMips
 		, uint16_t _numLayers
 		, TextureFormat::Enum _format
-		, bool _hasAlpha = false
 		);
 
 	///

+ 1 - 2
src/image.cpp

@@ -294,7 +294,7 @@ namespace bimg
 		return numMips;
 	}
 
-	uint32_t imageGetSize(TextureInfo* _info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _hasMips, uint16_t _numLayers, TextureFormat::Enum _format, bool _hasAlpha)
+	uint32_t imageGetSize(TextureInfo* _info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _hasMips, uint16_t _numLayers, TextureFormat::Enum _format)
 	{
 		const ImageBlockInfo& blockInfo = getBlockInfo(_format);
 		const uint8_t  bpp         = blockInfo.bitsPerPixel;
@@ -341,7 +341,6 @@ namespace bimg
 			_info->cubeMap   = _cubeMap;
 			_info->storageSize  = size;
 			_info->bitsPerPixel = bpp;
-			_info->hasAlpha = _hasAlpha;
 		}
 
 		return size;