Package com.ms.com.directX |
![]() Previous |
![]() Microsoft Packages |
![]() Index |
![]() Next |
Applications use the methods of the d3dTexture class to retrieve and set the properties of textures.
public class d3dTexture implements Id3dTexture { public void InternalSetObject(IUnknown lpdd); public IUnknown InternalGetObject(); public void Initialize(d3dDevice dev, ddSurface surf); public void GetHandle(d3dDevice dev, int[] hdl); public void PaletteChanged(int start, int count); public void Load(d3dTexture tex); public void Unload(); }
The methods can be organized into the following groups:
Handles | GetHandle |
Initialization | Initialize |
Loading | Load |
Unload | |
Palette information | PaletteChanged |
public void GetHandle(d3dDevice dev, int[] hdl);Obtains the texture handle for the d3dTexture object. This handle is used in all Direct3D API calls where a texture is to be referenced.
Return Value:
No return value.
Parameter Description dev The d3dDevice object into which the texture is to be loaded. hdl Array variable that receives the texture handle corresponding to the d3dTexture object.
public void Initialize(d3dDevice dev, ddSurface surf);Initializes the d3dTexture object.
Return Value:
No return value.
Parameter Description dev The device representing the Direct3D object. surf The DirectDraw surface for this object.
public void Load(d3dTexture tex);Loads a texture that was created with the DDSCAPS_ALLOCONLOAD flag, which indicates that memory for the DirectDraw surface is not allocated until the surface is loaded by using this method.
Return Value:
No return value.
Parameter Description tex The texture to load. See Also: Unload
public void PaletteChanged(int start, int count);Informs the driver that the palette has changed on a surface.
Return Value:
No return value.
Parameter Description start Index of first palette entry that has changed. count Number of palette entries that have changed. Remarks:
This method is particularly useful for applications that play video clips and therefore require palette-changing capabilities.
public void Unload();Unloads the current texture.
Return Value:
No return value.
See Also: Load