【翻译】Managed DirectX(第八章)[12]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

使用纹理资源

         Managed DirectX中所有的纹理资源都继承于BaseTexture类,而BaseTexture类又是从Resource类继承而来的。下面列出了BaseTexture对象中的几个新方法。

LevelCount

This read-only property specifies the number of levels this texture has. For example, a mipmapped texture (described in the sidebar "Dissecting Mipmaps") would have the number of mipmaps as its level count.

GenerateMipSubLevels

This method will automatically generate the mipmap sublevels we've just mentioned for you. It will use the next property to determine the filtering mode to use when creating these levels.

AutoGenerateFilterType

This read-write property describes how the mipmap sublevels are generated automatically. It takes a member of the TextureFilter enumeration, and will automatically re-create any mipmap sublevels if the filter type is changed. The default filter type for mipmap level generation is TextureFilter.Linear unless the driver does not support that mode, in which case it will use TextureFilter.Point. If the device does not support the selected filter type, this property set will throw an exception. All filter values are valid with the exception of "None". You can see the TextureFilterCaps member of the Caps structure to determine which filter types are supported by your device.

LevelOfDetail

Another read-write property that determines the most detailed level of detail for managed textures.

本文关键:【翻译】Managed DirectX(第八章)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top