Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The primary inputs into a texture stage are a texture map and a set of texture coordinates to index the map. The number of coordinates in the set should match the number of dimensions in the texture, or else a blend error of D3DMERR_DRIVERINVALIDCALL will result.
The amount of available memory that can be allocated for textures is roughly approximated by the IDirect3DMobileDevice::GetAvailableTextureMemmethod.
It is possible to change the current texture map bound to a stage with the IDirect3DMobileDevice::SetTexturemethod.
The transformation layer determines which texture coordinate sets are passed to each stage. It is up to the application to correctly program the transform layer to output appropriate coordinates to the enabled stages.
It is only necessary for a texture stage to have a texture map and coordinates if it uses the map as an input.
There are also two texture registers whose values are maintained from stage to stage. The two registers are the current register, and the temporary register. The registers hold color values. The current register is initialized with the diffuse color for the pixel. The temporary register is initialized to black (0x00000000). Each texture stage may read from these registers as input, and may output a color into them for the remaining stages. After all of the enabled stages have been executed, the value of the current register is the output of the texture mapping cascade.