Class Direct3dTexture
public class Direct3dTexture implements IDirect3dTexture
{
// Methods
public void getHandle(Direct3dDevice dev);
public void initialize(Direct3dDevice dev,
DirectDrawSurface surf);
public void load(Direct3dTexture tex);
public void paletteChanged(int start, int count);
public void unload();
}
Applications use the methods of the Direct3dTexture class to retrieve and set texture properties.
public void getHandle(Direct3dDevice dev);
Obtains the texture handle for the Direct3dTexture object. This handle is used in all Microsoft® Direct3D® API calls where a texture is to be referenced.
Return Value:
No return value.
Parameter | Description |
dev
| The Direct3dDevice object that the texture is to be loaded into.
|
public void initialize(Direct3dDevice dev, DirectDrawSurface surf);
Initializes the Direct3dTexture object.
Return Value:
No return value.
Parameter | Description |
dev
| The device representing the Direct3D object.
|
surf
| The DirectDrawSurface for this object.
|
public void load(Direct3dTexture 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
| The index of the first palette entry that has changed.
|
count
| The 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