1. Architectural Role & Engine Purpose
The TEX (Covert Strike Texture Container) format stores compressed surface artwork, character skins, weapon textures, environmental bump maps, and cubemap reflections in I.G.I. 2: Covert Strike.
In IGI 2, textures transitioned to Version 9 and Version 11 formats, implementing native DXTC hardware texture compression (DXT1, DXT3, DXT5). Textures are transferred directly from disk into GPU video RAM without CPU decompression, dramatically improving detail and visual fidelity.
2. Binary File Layout & Memory Map Diagram
An IGI 2 TEX file contains a version header, format flags, and precomputed DXT compressed block mipmaps:
3. Direct3D 8 Zero-Copy GPU Upload Pipeline Diagram
Because texels are stored in hardware DXTC format, the texture loader uploads them directly via Direct3D 8:
4. Architectural Mechanics & Engine Implementation Details
The introduction of DXTC in IGI 2 revolutionized the game's visuals:
- 4:1 and 6:1 Memory Savings: DXT1 compresses 24-bit color at 6:1 ratio, and DXT5 compresses 32-bit color with smooth alpha at 4:1 ratio. This allowed high-resolution 1024x1024 textures to fit comfortably inside 32MB and 64MB GeForce graphics cards.
- Bump Maps & Environmental Reflections: Version 11 introduced normal maps and 6-sided cubemap textures, giving metal weapon barrels and wet tarmac realistic specular highlights.
5. C++ Struct Definitions
#pragma pack(push, 1)
struct TexHeaderIgi2 {
char magic[4]; // "TEX "
uint16_t version; // 9 or 11
uint16_t width; // Texture width in pixels
uint16_t height; // Texture height in pixels
uint16_t mip_levels; // Mipmap count
char fourcc_format[4];// "DXT1", "DXT3", "DXT5"
uint32_t flags; // 1=Cubemap, 2=BumpMap, 4=Alpha
uint32_t reserved[3];
};
static_assert(sizeof(TexHeaderIgi2) == 32, "TexHeaderIgi2 must be 32 bytes");
#pragma pack(pop)