Microsoft DirectX 8.1 (Visual Basic) |
Your application manipulates resources in order to render a scene. First, the application creates texture resources by using the following methods.
The texture objects returned by the texture creation methods are containers for surfaces or volumes; these containers are generically known as buffers. The buffers owned by the resource inherit the usages, format, and pool of the resource but have their own type. For more information, see Resource Properties.
The application gains access to the contained surfaces, for the purpose of loading artwork, by calling the following methods. For details, see Locking Resources.
The lock methods take arguments denoting the contained surface—for example, the mipmap sub-level or cube face of the texture—and return pointers to the pixels. The typical application never uses a surface object directly.
In addition, the application creates geometry-oriented resources by using the following methods.
If your application is allowing the Microsoft® Direct3D® run time to manage these resources, then the resource creation process ends here. Otherwise, the application manages the promotion of system memory resources to device-accessible resources, where the hardware accelerator can use them, by calling Direct3DDevice8.UpdateTexture.
To present images rendered from resources, the application also needs color and depth-stencil buffers. For typical applications, the color buffer is owned by the device's swap chain, which is a collection of back buffer surfaces, and is implicitly created with the device. Depth-stencil surfaces can be implicitly created, or explicitly created by using the Direct3DDevice8.CreateDepthStencilSurface method. The application associates a device and its depth and color buffer with a call to Direct3DDevice8.SetRenderTarget.
For details on presenting the final image, see Presenting a Scene.