Platform SDK: DirectX |
Textures are simply DirectDraw surface objects, and therefore they expose the IDirectDrawSurface7 interface. The first step in obtaining a pointer to a texture surface interface is to create a DirectDraw surface with the DDSCAPS_TEXTURE capability set. See Creating Surfaces and DDSCAPS2.
Once the surface is created, your application has a pointer to the texture surface's IDirectDrawSurface7 interface. You can use the methods of the surface interface to manipulate the data it contains the same as you would with any other surface. The IDirectDrawSurface7 of a texture serves as its identifier; all of the texture-related methods in the IDirect3DDevice7 interface accept pointers to this interface.
Note Use the IDirect3DDevice7::Load method to load images into your textures. Loading textures into video memory by calling this method is preferred over blit operations.
Textures are simply DirectDraw surface objects, represented by the DirectDrawSurface7 class. The first step in obtaining a texture is to create a DirectDraw surface with the DDSCAPS_TEXTURE capability set. See Creating Surfaces and DDSCAPS2.
Once the surface is created, your application has a reference to the surface class object. You can use the methods of DirectDrawSurface7 to manipulate the data it contains the same as you would with any other surface. Textures are identified by the reference to the DirectDrawSurface7 class that your application holds. All of the texture-related methods in the Direct3DDevice7 class accept this class reference as a parameter.
Note Use the Direct3DDevice7.Load method to load images into your textures. Loading textures into video memory by calling this method is preferred over blit operations.