|
TextureLoaderCreateStandardTextureMaterial(DXDevice, String) Method |
CreateStandardTextureMaterial method can load image png, jpg, tiff, gif, bmp, ico or dds file and create a
StandardMaterial.
The loaded texture is set to the DiffuseTextures property. The method also sets the TextureBlendState and HasTransparency properties.
The returned StandardMaterial and the ShaderResourceView that is set to the DiffuseTextures must be manually disposed by the user.
Namespace: Ab3d.DirectXAssembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.1.9105.2048 (1.0.0.0)
Syntax public static StandardMaterial CreateStandardTextureMaterial(
DXDevice dxDevice,
string fileName
)
Parameters
- dxDevice DXDevice
- DXEngine DXDevice
- fileName String
- file name with full path to the file
Return Value
StandardMaterialStandardMaterial with loaded texture set to DiffuseTextures
Remarks
CreateStandardTextureMaterial method can load image png, jpg, tiff, gif, bmp, ico or dds file and create a StandardMaterial.
The loaded texture is set to the DiffuseTextures property. The method also sets the TextureBlendState and HasTransparency properties.
The returned StandardMaterial and the ShaderResourceView that is set to the DiffuseTextures must be manually disposed by the user.
This method is first calling the LoadShaderResourceView(Device, String, Boolean, Boolean, Boolean, Boolean, TextureInfo) method
and then GetRecommendedBlendState(Boolean, Boolean) method to get the recommended BlendState.
See Also