This class represents a VTF image file as documented at https://developer.valvesoftware.com/wiki/VTF. More...
#include "Loader_mdl_hl2_vtf.hpp"
Public Member Functions | |
vtfFileT (const std::string &FileName) | |
const vtfHeaderT * | GetHeader () const |
uint8_t * | GetData (uint32_t Frame, uint32_t Face, uint32_t Slice, uint32_t MipmapLevel) const |
Returns a pointer to the image data for a given frame, face, z-slice and MIP level. More... | |
This class represents a VTF image file as documented at https://developer.valvesoftware.com/wiki/VTF.
In summary, the disk file format for VTF files is:
The image data is stored as follows:
uint8_t * vtfFileT::GetData | ( | uint32_t | Frame, |
uint32_t | Face, | ||
uint32_t | Slice, | ||
uint32_t | MipmapLevel | ||
) | const |
Returns a pointer to the image data for a given frame, face, z-slice and MIP level.
Frames start at index 0 for the first frame. Faces start at index 0 for the first face. Cubemaps have 6 faces, others only 1. MIP levels start at index 0 for the largest image moving down in size.