CPixel Support Methods for Lightweight MIP Maps

This section describes the methods defined for the CPixel class. These methods are used to recover the layout of lightweight system memory MIP-map textures. Method prototypes are defined in the pixel.hpp file. This file along with pixel.cpp and pixlib.cpp were originally included in the Microsoft Windows Driver Development Kit (DDK) and are used to build the PixLib.lib support library. (The DDK preceded the Windows Driver Kit [WDK].)

For more information about the PixLib.lib library, see the PixLib sample in the Hardware Dev Center.

For your driver to use the following CPixel class methods, you must include the pixel.hpp file in your code and link to PixLib.lib when you build your driver.

CPixel Class Method Description

ComputeSurfaceSize

Determines the amount of memory required to allocate a surface.

ComputeVolumeSize

Determines the amount of memory required to allocate a volume.

ComputeMipMapSize

Determines the amount of memory required to allocate a MIP-map texture.

ComputeMipVolumeSize

Determines the amount of memory required to allocate a MIP-map texture volume.

ComputeMipMapOffset

Determines the sublevel offset of a MIP-map texture.

ComputeMipVolumeOffset

Determines the subvolume offset of a MIP-map volume texture.

ComputeSurfaceOffset

Determines the subrectangular offset of a surface.