|
| enum | Flags : uint32_t {
FLAG_V0_POINT_SAMPLE = 1u << 0
, FLAG_V0_TRILINEAR = 1u << 1
, FLAG_V0_CLAMP_S = 1u << 2
, FLAG_V0_CLAMP_T = 1u << 3
,
FLAG_V0_ANISOTROPIC = 1u << 4
, FLAG_V0_VTEX_HINT_DXT5 = 1u << 5
, FLAG_V0_VTEX_NO_COMPRESS = 1u << 6
, FLAG_V0_NORMAL = 1u << 7
,
FLAG_V0_NO_MIP = 1u << 8
, FLAG_V0_NO_LOD = 1u << 9
, FLAG_V0_LOAD_SMALL_MIPS = 1u << 10
, FLAG_V0_PROCEDURAL = 1u << 11
,
FLAG_V0_ONE_BIT_ALPHA = 1u << 12
, FLAG_V0_MULTI_BIT_ALPHA = 1u << 13
, FLAG_V0_ENVMAP = 1u << 14
, FLAG_MASK_V0 = FLAG_V0_POINT_SAMPLE | FLAG_V0_TRILINEAR | FLAG_V0_CLAMP_S | FLAG_V0_CLAMP_T | FLAG_V0_ANISOTROPIC | FLAG_V0_VTEX_HINT_DXT5 | FLAG_V0_VTEX_NO_COMPRESS | FLAG_V0_NORMAL | FLAG_V0_NO_MIP | FLAG_V0_NO_LOD | FLAG_V0_LOAD_SMALL_MIPS | FLAG_V0_PROCEDURAL | FLAG_V0_ONE_BIT_ALPHA | FLAG_V0_MULTI_BIT_ALPHA | FLAG_V0_ENVMAP
,
FLAG_MASK_V0_VTEX = FLAG_V0_VTEX_HINT_DXT5 | FLAG_V0_VTEX_NO_COMPRESS
, FLAG_V1_RENDERTARGET = 1u << 15
, FLAG_V1_DEPTH_RENDERTARGET = 1u << 16
, FLAG_V1_NO_DEBUG_OVERRIDE = 1u << 17
,
FLAG_V1_SINGLE_COPY = 1u << 18
, FLAG_V1_VTEX_ONE_OVER_MIP_LEVEL_IN_ALPHA = 1u << 19
, FLAG_V1_VTEX_PREMULTIPLY_COLOR_BY_ONE_OVER_MIP_LEVEL = 1u << 20
, FLAG_V1_VTEX_CONVERT_NORMAL_TO_DUDV = 1u << 21
,
FLAG_MASK_V1 = FLAG_V1_RENDERTARGET | FLAG_V1_DEPTH_RENDERTARGET | FLAG_V1_NO_DEBUG_OVERRIDE | FLAG_V1_SINGLE_COPY | FLAG_V1_VTEX_ONE_OVER_MIP_LEVEL_IN_ALPHA | FLAG_V1_VTEX_PREMULTIPLY_COLOR_BY_ONE_OVER_MIP_LEVEL | FLAG_V1_VTEX_CONVERT_NORMAL_TO_DUDV
, FLAG_MASK_V1_VTEX = FLAG_V1_VTEX_ONE_OVER_MIP_LEVEL_IN_ALPHA | FLAG_V1_VTEX_PREMULTIPLY_COLOR_BY_ONE_OVER_MIP_LEVEL | FLAG_V1_VTEX_CONVERT_NORMAL_TO_DUDV
, FLAG_V2_VTEX_ALPHA_TEST_MIP_GENERATION = 1u << 22
, FLAG_V2_NO_DEPTH_BUFFER = 1u << 23
,
FLAG_V2_VTEX_NICE_FILTERED = 1u << 24
, FLAG_V2_CLAMP_U = 1u << 25
, FLAG_MASK_V2 = FLAG_V2_VTEX_ALPHA_TEST_MIP_GENERATION | FLAG_V2_NO_DEPTH_BUFFER | FLAG_V2_VTEX_NICE_FILTERED | FLAG_V2_CLAMP_U
, FLAG_MASK_V2_VTEX = FLAG_V2_VTEX_ALPHA_TEST_MIP_GENERATION | FLAG_V2_VTEX_NICE_FILTERED
,
FLAG_XBOX_VTEX_PRESWIZZLED = 1u << 26
, FLAG_XBOX_CACHEABLE = 1u << 27
, FLAG_XBOX_UNFILTERABLE_OK = 1u << 28
, FLAG_MASK_XBOX = FLAG_XBOX_VTEX_PRESWIZZLED | FLAG_XBOX_CACHEABLE | FLAG_XBOX_UNFILTERABLE_OK
,
FLAG_MASK_XBOX_VTEX = FLAG_XBOX_VTEX_PRESWIZZLED
, FLAG_V3_LOAD_ALL_MIPS = 1u << 10
, FLAG_V3_VERTEX_TEXTURE = 1u << 26
, FLAG_V3_SSBUMP = 1u << 27
,
FLAG_V3_BORDER = 1u << 29
, FLAG_MASK_V3 = FLAG_V3_LOAD_ALL_MIPS | FLAG_V3_VERTEX_TEXTURE | FLAG_V3_SSBUMP | FLAG_V3_BORDER
, FLAG_V4_SRGB = 1u << 6
, FLAG_MASK_V4 = FLAG_V4_SRGB
,
FLAG_V4_TF2_STAGING_MEMORY = 1u << 19
, FLAG_V4_TF2_IMMEDIATE_CLEANUP = 1u << 20
, FLAG_V4_TF2_IGNORE_PICMIP = 1u << 21
, FLAG_V4_TF2_STREAMABLE_COARSE = 1u << 30
,
FLAG_V4_TF2_STREAMABLE_FINE = 1u << 31
, FLAG_MASK_V4_TF2 = FLAG_V4_TF2_STAGING_MEMORY | FLAG_V4_TF2_IMMEDIATE_CLEANUP | FLAG_V4_TF2_IGNORE_PICMIP | FLAG_V4_TF2_STREAMABLE_COARSE | FLAG_V4_TF2_STREAMABLE_FINE
, FLAG_V5_PWL_CORRECTED = 1u << 6
, FLAG_V5_SRGB = 1u << 19
,
FLAG_V5_DEFAULT_POOL = 1u << 20
, FLAG_V5_LOAD_MOST_MIPS = 1u << 28
, FLAG_MASK_V5 = FLAG_V5_PWL_CORRECTED | FLAG_V5_SRGB | FLAG_V5_DEFAULT_POOL | FLAG_V5_LOAD_MOST_MIPS
, FLAG_V5_CSGO_COMBINED = 1u << 21
,
FLAG_V5_CSGO_ASYNC_DOWNLOAD = 1u << 22
, FLAG_V5_CSGO_SKIP_INITIAL_DOWNLOAD = 1u << 24
, FLAG_V5_CSGO_YCOCG = 1u << 30
, FLAG_V5_CSGO_ASYNC_SKIP_INITIAL_LOW_RES = 1u << 31
,
FLAG_MASK_V5_CSGO = FLAG_V5_CSGO_COMBINED | FLAG_V5_CSGO_ASYNC_DOWNLOAD | FLAG_V5_CSGO_SKIP_INITIAL_DOWNLOAD | FLAG_V5_CSGO_YCOCG | FLAG_V5_CSGO_ASYNC_SKIP_INITIAL_LOW_RES
, FLAG_MASK_INTERNAL = FLAG_V0_NO_MIP | FLAG_V0_ENVMAP
} |
| enum | Platform : uint32_t {
PLATFORM_UNKNOWN = 0x000
, PLATFORM_PC = 0x007
, PLATFORM_XBOX = 0x005
, PLATFORM_X360 = 0x360
,
PLATFORM_PS3_ORANGEBOX = 0x333
, PLATFORM_PS3_PORTAL2 = 0x334
} |
|
| | VTF () |
| | VTF (std::vector< std::byte > &&vtfData, bool parseHeaderOnly=false) |
| | VTF (std::span< const std::byte > vtfData, bool parseHeaderOnly=false) |
| | VTF (const std::filesystem::path &vtfPath, bool parseHeaderOnly=false) |
| | VTF (const VTF &other) |
| VTF & | operator= (const VTF &other) |
| | VTF (VTF &&) noexcept=default |
| VTF & | operator= (VTF &&) noexcept=default |
| | operator bool () const |
| Platform | getPlatform () const |
| void | setPlatform (Platform newPlatform) |
| uint32_t | getVersion () const |
| void | setVersion (uint32_t newVersion) |
| ImageConversion::ResizeMethod | getImageWidthResizeMethod () const |
| ImageConversion::ResizeMethod | getImageHeightResizeMethod () const |
| void | setImageResizeMethods (ImageConversion::ResizeMethod imageWidthResizeMethod_, ImageConversion::ResizeMethod imageHeightResizeMethod_) |
| void | setImageWidthResizeMethod (ImageConversion::ResizeMethod imageWidthResizeMethod_) |
| void | setImageHeightResizeMethod (ImageConversion::ResizeMethod imageHeightResizeMethod_) |
| uint16_t | getWidth (uint8_t mip=0) const |
| uint16_t | getPaddedWidth (uint8_t mip=0) const |
| uint16_t | getHeight (uint8_t mip=0) const |
| uint16_t | getPaddedHeight (uint8_t mip=0) const |
| void | setSize (uint16_t newWidth, uint16_t newHeight, ImageConversion::ResizeFilter filter) |
| uint32_t | getFlags () const |
| void | setFlags (uint32_t flags_) |
| void | addFlags (uint32_t flags_) |
| void | removeFlags (uint32_t flags_) |
| bool | isSRGB () const |
| void | setSRGB (bool srgb) |
| void | computeTransparencyFlags () |
| ImageFormat | getFormat () const |
| void | setFormat (ImageFormat newFormat, ImageConversion::ResizeFilter filter=ImageConversion::ResizeFilter::DEFAULT, float quality=ImageConversion::DEFAULT_COMPRESSED_QUALITY) |
| uint8_t | getMipCount () const |
| bool | setMipCount (uint8_t newMipCount) |
| bool | setRecommendedMipCount () |
| void | computeMips (ImageConversion::ResizeFilter filter=ImageConversion::ResizeFilter::DEFAULT) |
| uint16_t | getFrameCount () const |
| bool | setFrameCount (uint16_t newFrameCount) |
| uint8_t | getFaceCount () const |
| bool | setFaceCount (bool isCubeMap) |
| uint16_t | getDepth (uint8_t mip=0) const |
| bool | setDepth (uint16_t newDepth) |
| bool | setFrameFaceAndDepth (uint16_t newFrameCount, bool isCubeMap, uint16_t newDepth=1) |
| uint16_t | getStartFrame () const |
| void | setStartFrame (uint16_t newStartFrame) |
| sourcepp::math::Vec3f | getReflectivity () const |
| void | setReflectivity (sourcepp::math::Vec3f newReflectivity) |
| void | computeReflectivity () |
| float | getBumpMapScale () const |
| void | setBumpMapScale (float newBumpMapScale) |
| ImageFormat | getThumbnailFormat () const |
| uint8_t | getThumbnailWidth () const |
| uint8_t | getThumbnailHeight () const |
| uint8_t | getFallbackWidth () const |
| uint8_t | getFallbackHeight () const |
| uint8_t | getFallbackMipCount () const |
| const std::vector< Resource > & | getResources () const |
| const Resource * | getResource (Resource::Type type) const |
| std::vector< std::byte > | getPaletteResourceFrame (uint16_t frame=0) const |
| std::vector< std::byte > | getParticleSheetFrameDataRaw (uint16_t &spriteWidth, uint16_t &spriteHeight, uint32_t shtSequenceID, uint32_t shtFrame, uint8_t shtBounds=0, uint8_t mip=0, uint16_t frame=0, uint8_t face=0, uint16_t slice=0) const |
| | This is a convenience function. You're best off uploading the bounds to the GPU and scaling the UV there if trying to render a particle.
|
| std::vector< std::byte > | getParticleSheetFrameDataAs (ImageFormat newFormat, uint16_t &spriteWidth, uint16_t &spriteHeight, uint32_t shtSequenceID, uint32_t shtFrame, uint8_t shtBounds=0, uint8_t mip=0, uint16_t frame=0, uint8_t face=0, uint16_t slice=0) const |
| | This is a convenience function. You're best off uploading the bounds to the GPU and scaling the UV there if trying to render a particle.
|
| std::vector< std::byte > | getParticleSheetFrameDataAsRGBA8888 (uint16_t &spriteWidth, uint16_t &spriteHeight, uint32_t shtSequenceID, uint32_t shtFrame, uint8_t shtBounds=0, uint8_t mip=0, uint16_t frame=0, uint8_t face=0, uint16_t slice=0) const |
| | This is a convenience function. You're best off uploading the bounds to the GPU and scaling the UV there if trying to render a particle.
|
| void | setParticleSheetResource (const SHT &value) |
| void | removeParticleSheetResource () |
| void | setCRCResource (uint32_t value) |
| void | removeCRCResource () |
| void | setLODResource (uint8_t u, uint8_t v, uint8_t u360=0, uint8_t v360=0) |
| void | removeLODResource () |
| void | setExtendedFlagsResource (uint32_t value) |
| void | removeExtendedFlagsResource () |
| void | setKeyValuesDataResource (std::string_view value) |
| void | removeKeyValuesDataResource () |
| void | setHotspotDataResource (const HOT &value) |
| void | removeHotspotDataResource () |
| int16_t | getCompressionLevel () const |
| void | setCompressionLevel (int16_t newCompressionLevel) |
| CompressionMethod | getCompressionMethod () const |
| void | setCompressionMethod (CompressionMethod newCompressionMethod) |
| bool | hasImageData () const |
| std::span< const std::byte > | getImageDataRaw (uint8_t mip=0, uint16_t frame=0, uint8_t face=0, uint16_t slice=0) const |
| std::vector< std::byte > | getImageDataAs (ImageFormat newFormat, uint8_t mip=0, uint16_t frame=0, uint8_t face=0, uint16_t slice=0) const |
| std::vector< std::byte > | getImageDataAsRGBA8888 (uint8_t mip=0, uint16_t frame=0, uint8_t face=0, uint16_t slice=0) const |
| bool | setImage (std::span< const std::byte > imageData_, ImageFormat format_, uint16_t width_, uint16_t height_, ImageConversion::ResizeFilter filter=ImageConversion::ResizeFilter::DEFAULT, uint8_t mip=0, uint16_t frame=0, uint8_t face=0, uint16_t slice=0, float quality=ImageConversion::DEFAULT_COMPRESSED_QUALITY) |
| bool | setImage (const std::filesystem::path &imagePath, ImageConversion::ResizeFilter filter=ImageConversion::ResizeFilter::DEFAULT, uint8_t mip=0, uint16_t frame=0, uint8_t face=0, uint16_t slice=0, float quality=ImageConversion::DEFAULT_COMPRESSED_QUALITY) |
| std::vector< std::byte > | saveImageToFile (uint8_t mip=0, uint16_t frame=0, uint8_t face=0, uint16_t slice=0, ImageConversion::FileFormat fileFormat=ImageConversion::FileFormat::DEFAULT) const |
| bool | saveImageToFile (const std::filesystem::path &imagePath, uint8_t mip=0, uint16_t frame=0, uint8_t face=0, uint16_t slice=0, ImageConversion::FileFormat fileFormat=ImageConversion::FileFormat::DEFAULT) const |
| bool | hasThumbnailData () const |
| std::span< const std::byte > | getThumbnailDataRaw () const |
| std::vector< std::byte > | getThumbnailDataAs (ImageFormat newFormat) const |
| std::vector< std::byte > | getThumbnailDataAsRGBA8888 () const |
| void | setThumbnail (std::span< const std::byte > imageData_, ImageFormat format_, uint16_t width_, uint16_t height_, float quality=ImageConversion::DEFAULT_COMPRESSED_QUALITY) |
| bool | setThumbnail (const std::filesystem::path &imagePath, float quality=ImageConversion::DEFAULT_COMPRESSED_QUALITY) |
| void | computeThumbnail (ImageConversion::ResizeFilter filter=ImageConversion::ResizeFilter::DEFAULT, float quality=ImageConversion::DEFAULT_COMPRESSED_QUALITY) |
| void | removeThumbnail () |
| std::vector< std::byte > | saveThumbnailToFile (ImageConversion::FileFormat fileFormat=ImageConversion::FileFormat::DEFAULT) const |
| bool | saveThumbnailToFile (const std::filesystem::path &imagePath, ImageConversion::FileFormat fileFormat=ImageConversion::FileFormat::DEFAULT) const |
| bool | hasFallbackData () const |
| std::span< const std::byte > | getFallbackDataRaw (uint8_t mip=0, uint16_t frame=0, uint8_t face=0) const |
| std::vector< std::byte > | getFallbackDataAs (ImageFormat newFormat, uint8_t mip=0, uint16_t frame=0, uint8_t face=0) const |
| std::vector< std::byte > | getFallbackDataAsRGBA8888 (uint8_t mip=0, uint16_t frame=0, uint8_t face=0) const |
| void | computeFallback (ImageConversion::ResizeFilter filter=ImageConversion::ResizeFilter::DEFAULT) |
| void | removeFallback () |
| std::vector< std::byte > | saveFallbackToFile (uint8_t mip=0, uint16_t frame=0, uint8_t face=0, ImageConversion::FileFormat fileFormat=ImageConversion::FileFormat::DEFAULT) const |
| bool | saveFallbackToFile (const std::filesystem::path &imagePath, uint8_t mip=0, uint16_t frame=0, uint8_t face=0, ImageConversion::FileFormat fileFormat=ImageConversion::FileFormat::DEFAULT) const |
| uint8_t | getConsoleMipScale () const |
| void | setConsoleMipScale (uint8_t consoleMipScale_) |
| uint64_t | estimateBakeSize () const |
| uint64_t | estimateBakeSize (bool &isExact) const |
| std::vector< std::byte > | bake () const |
| bool | bake (const std::filesystem::path &vtfPath) const |
Definition at line 146 of file VTF.h.