VTFLib
A C and C++ API that, with a few simple functions, can open and save .vtf and .vmt files.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Enumerations
VTFFormat.h File Reference

Structures and enumerations relating to the VTF file format. More...

#include "stdafx.h"

Go to the source code of this file.

Data Structures

struct  SVTFFileHeader
 VTFFileHeader struct. More...
 
struct  SVTFHeader_70
 VTFHeader_70 struct. More...
 
struct  SVTFHeader_70_A
 VTFHeader_70_A struct. More...
 
struct  SVTFHeader_71
 VTFHeader_71 struct. More...
 
struct  SVTFHeader_71_A
 VTFHeader_71_A struct. More...
 
struct  SVTFHeader_72
 VTFHeader_72 struct. More...
 
struct  SVTFHeader_72_A
 VTFHeader_72_A struct. More...
 
struct  SVTFHeader_73
 VTFHeader_73 struct. More...
 
struct  SVTFHeader_73_A
 VTFHeader_72_A struct. More...
 
struct  SVTFHeader_74
 VTFHeader_74 struct. More...
 
struct  SVTFHeader_74_A
 VTFHeader_74_A struct. More...
 
struct  SVTFHeader_75
 VTFHeader_75 struct. More...
 
struct  SVTFHeader_75_A
 VTFHeader_75_A struct. More...
 

Macros

#define VTF_MAJOR_VERSION   7
 VTF major version number.
 
#define VTF_MINOR_VERSION   5
 VTF minor version number.
 

Enumerations

enum  VTFImageFormat {
  IMAGE_FORMAT_RGBA8888 = 0, IMAGE_FORMAT_ABGR8888, IMAGE_FORMAT_RGB888, IMAGE_FORMAT_BGR888,
  IMAGE_FORMAT_RGB565, IMAGE_FORMAT_I8, IMAGE_FORMAT_IA88, IMAGE_FORMAT_P8,
  IMAGE_FORMAT_A8, IMAGE_FORMAT_RGB888_BLUESCREEN, IMAGE_FORMAT_BGR888_BLUESCREEN, IMAGE_FORMAT_ARGB8888,
  IMAGE_FORMAT_BGRA8888, IMAGE_FORMAT_DXT1, IMAGE_FORMAT_DXT3, IMAGE_FORMAT_DXT5,
  IMAGE_FORMAT_BGRX8888, IMAGE_FORMAT_BGR565, IMAGE_FORMAT_BGRX5551, IMAGE_FORMAT_BGRA4444,
  IMAGE_FORMAT_DXT1_ONEBITALPHA, IMAGE_FORMAT_BGRA5551, IMAGE_FORMAT_UV88, IMAGE_FORMAT_UVWQ8888,
  IMAGE_FORMAT_RGBA16161616F, IMAGE_FORMAT_RGBA16161616, IMAGE_FORMAT_UVLX8888, IMAGE_FORMAT_R32F,
  IMAGE_FORMAT_RGB323232F, IMAGE_FORMAT_RGBA32323232F
}
 Image data formats VTFLib supports. More...
 
enum  VTFImageFlag { ,
  TEXTUREFLAGS_ONEBITALPHA = 0x00001000, TEXTUREFLAGS_EIGHTBITALPHA = 0x00002000 , TEXTUREFLAGS_UNUSED0 = 0x00080000 , TEXTUREFLAGS_UNUSED1 = 0x00100000 ,
  TEXTUREFLAGS_UNUSED2 = 0x00200000 , TEXTUREFLAGS_UNUSED3 = 0x00400000 , TEXTUREFLAGS_UNUSED4 = 0x01000000 , TEXTUREFLAGS_UNUSED5 = 0x10000000
}
 VTF image header flags. More...
 
enum  VTFCubeMapFace
 VTF image cubemap face indices.
 
enum  VTFMipmapFilter
 MIP map reduction filter indices.
 
enum  VTFSharpenFilter
 MIP map sharpen filter indices.
 
enum  VTFKernelFilter
 Normal map creation kernel size indices.
 
enum  VTFHeightConversionMethod
 Normal map height conversion method indices.
 
enum  VTFNormalAlphaResult
 Normal map alpha channel handling indices.
 
enum  VTFResizeMethod
 Image re-size handling method indices.
 
enum  VTFLookDir
 Spheremap creation look direction indices.
 
enum  VTFResourceEntryTypeFlag
 Resource entry type flags.
 
enum  VTFResourceEntryType
 Resource entry type idendifiers.
 

Detailed Description

Structures and enumerations relating to the VTF file format.

Contains's structures and enumerations relating to the VTF file format.

Disk file format for VTF files is as follows:

Image Data is stored as follows:

Enumeration Type Documentation

VTF image header flags.

Enumerator
TEXTUREFLAGS_ONEBITALPHA 

Automatically generated by VTex.

TEXTUREFLAGS_EIGHTBITALPHA 

Automatically generated by VTex.

TEXTUREFLAGS_UNUSED0 

Originally internal to VTex as TEXTUREFLAGS_ONEOVERMIPLEVELINALPHA.

TEXTUREFLAGS_UNUSED1 

Originally internal to VTex as TEXTUREFLAGS_PREMULTCOLORBYONEOVERMIPLEVEL.

TEXTUREFLAGS_UNUSED2 

Originally internal to VTex as TEXTUREFLAGS_NORMALTODUDV.

TEXTUREFLAGS_UNUSED3 

Originally internal to VTex as TEXTUREFLAGS_ALPHATESTMIPGENERATION.

TEXTUREFLAGS_UNUSED4 

Originally internal to VTex as TEXTUREFLAGS_NICEFILTERED.

TEXTUREFLAGS_UNUSED5 

Originally TEXTUREFLAGS_UNFILTERABLE_OK.

Image data formats VTFLib supports.

Image data formats supported by VTFLib. Details show colour channel order, plus number of bits per-pixel.

Note
"Bluescreen" alpha uses any pixel with an pixel of R0, G0, B255 as transparent.
Enumerator
IMAGE_FORMAT_RGBA8888 

= Red, Green, Blue, Alpha - 32 bpp

IMAGE_FORMAT_ABGR8888 

= Alpha, Blue, Green, Red - 32 bpp

IMAGE_FORMAT_RGB888 

= Red, Green, Blue - 24 bpp

IMAGE_FORMAT_BGR888 

= Blue, Green, Red - 24 bpp

IMAGE_FORMAT_RGB565 

= Red, Green, Blue - 16 bpp

IMAGE_FORMAT_I8 

= Luminance - 8 bpp

IMAGE_FORMAT_IA88 

= Luminance, Alpha - 16 bpp

IMAGE_FORMAT_P8 

= Paletted - 8 bpp

IMAGE_FORMAT_A8 

= Alpha- 8 bpp

IMAGE_FORMAT_RGB888_BLUESCREEN 

= Red, Green, Blue, "BlueScreen" Alpha - 24 bpp

IMAGE_FORMAT_BGR888_BLUESCREEN 

= Red, Green, Blue, "BlueScreen" Alpha - 24 bpp

IMAGE_FORMAT_ARGB8888 

= Alpha, Red, Green, Blue - 32 bpp

IMAGE_FORMAT_BGRA8888 

= Blue, Green, Red, Alpha - 32 bpp

IMAGE_FORMAT_DXT1 

= DXT1 compressed format - 4 bpp

IMAGE_FORMAT_DXT3 

= DXT3 compressed format - 8 bpp

IMAGE_FORMAT_DXT5 

= DXT5 compressed format - 8 bpp

IMAGE_FORMAT_BGRX8888 

= Blue, Green, Red, Unused - 32 bpp

IMAGE_FORMAT_BGR565 

= Blue, Green, Red - 16 bpp

IMAGE_FORMAT_BGRX5551 

= Blue, Green, Red, Unused - 16 bpp

IMAGE_FORMAT_BGRA4444 

= Red, Green, Blue, Alpha - 16 bpp

IMAGE_FORMAT_DXT1_ONEBITALPHA 

= DXT1 compressed format with 1-bit alpha - 4 bpp

IMAGE_FORMAT_BGRA5551 

= Blue, Green, Red, Alpha - 16 bpp

IMAGE_FORMAT_UV88 

= 2 channel format for DuDv/Normal maps - 16 bpp

IMAGE_FORMAT_UVWQ8888 

= 4 channel format for DuDv/Normal maps - 32 bpp

IMAGE_FORMAT_RGBA16161616F 

= Red, Green, Blue, Alpha - 64 bpp

IMAGE_FORMAT_RGBA16161616 

= Red, Green, Blue, Alpha signed with mantissa - 64 bpp

IMAGE_FORMAT_UVLX8888 

= 4 channel format for DuDv/Normal maps - 32 bpp

IMAGE_FORMAT_R32F 

= Luminance - 32 bpp

IMAGE_FORMAT_RGB323232F 

= Red, Green, Blue - 96 bpp

IMAGE_FORMAT_RGBA32323232F 

= Red, Green, Blue, Alpha - 128 bpp