The information in this article applies to:
SUMMARY
The D3DMIP Direct3D Immediate Mode example application demonstrates how to
create a mipmapped texture using a source and destination DirectDraw
surface.
D3dmip.exeFor more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. MORE INFORMATIOND3DMIP shows how to create a mipmapped texture surface and mipmapped texture object from a series of three BMP files. There are three levels in the mipmap and, consequently, three DirectDraw surfaces in the complex surface are created for the mipmap. The creation of the mipmap is done in a two step process. A source texture surface is created in system memory and a source texture object is created by calling QueryInterface() on that surface. A second, initially empty, DirectDraw texture surface is created in video memory if 3D accelerated hardware was selected. If using the HEL, the second surface is created in system memory. A second texture object, the destination texture, is created based off of this surface. The source texture is loaded into the destination texture surface with a call to IDirect3DTexture::Load() and then discarded. This process allows a 3D accelerated device to compress a texture map as it enters video memory during the IDirect3DTexture::Load() call. The creation of textures must be done in this manner. For further example code on the creation of source and destination texture objects and texture surfaces, look at file "texture.c" in the "misc" directory of the DirectX SDK samples. Additional query words:
Keywords : kbfile kbsample KbDirectX300 kbSDKWin32 |
Last Reviewed: December 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |