Click or drag to resize
AB4D logo

TextureLoader Methods

The TextureLoader type exposes the following members.

Methods
 NameDescription
Public methodStatic memberCreateOnePixelTexture CreateOnePixelTexture creates a 1 x 1 texture with the specified color (color is converted into BGRA byte values) and returns the texture as ShaderResourceView.
Public methodStatic memberCreateShaderResourceView(Device, Byte, Int32, Int32, Int32, Format, Boolean) CreateShaderResourceView returns a ShaderResourceView from the specified byte array. The method can also generate mipmaps when generateMipMaps is set to true (by default).
Public methodStatic memberCreateShaderResourceView(DXDevice, Byte, Int32, Int32, Int32, Format, Boolean) CreateShaderResourceView returns a ShaderResourceView from the specified byte array. The method can also generate mipmaps when generateMipMaps is set to true (by default).
Public methodStatic memberCreateShaderResourceView(Device, Byte, Int32, Int32, Int32, Format, Boolean, Boolean) CreateShaderResourceView returns a ShaderResourceView from the specified byte array. The method can also generate mipmaps when generateMipMaps is set to true (by default).
Public methodStatic memberCreateStandardTextureMaterial(DXDevice, String) 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.
Public methodStatic memberCreateStandardTextureMaterial(DXDevice, String, Boolean, Boolean, Boolean) 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.
Public methodStatic memberHasTransparentPixels HasTransparentPixels returns true when the loaded image contains transparent pixels (where alpha is less the 1); for fully opaque image false is returned.
Public methodStatic memberIsSupportedFile Returns true if the specified file name has a file extension that is supported with this TextureLoader.
Public methodStatic memberIsSupportedFileExtension Returns true if the specified file extension has a file extension that is supported with this TextureLoader. File extension must start with leading period (for example ".png").
Public methodStatic memberLoadShaderResourceView(Device, String, TextureInfo) LoadShaderResourceViewFrom can load image png, jpg, tiff, gif, bmp, ico or dds file into ShaderResourceView. When loadDdsIfPresent is set to true and file extension is not dds, then loader checks if there is a dds file with the same name but dds file extension present in the same folder as the specified fileName. If dds file exist, it is loaded instead of the file specified with fileName. This can greatly improve load performance and memory usage.
Public methodStatic memberLoadShaderResourceView(Device, String, Boolean, Boolean, Boolean) LoadShaderResourceViewFrom can load image png, jpg, tiff, gif, bmp, ico or dds file into ShaderResourceView. When loadDdsIfPresent is set to true and file extension is not dds, the loader checked if there is a dds file with the same name but dds file extension. If dds file exist, it is loaded instead of the file specified with fileName. This can greatly improve load performance and memory usage.
Public methodStatic memberLoadShaderResourceView(Device, String, Boolean, Boolean, Boolean, TextureInfo) LoadShaderResourceViewFrom can load image png, jpg, tiff, gif, bmp, ico or dds file into ShaderResourceView. When loadDdsIfPresent is set to true and file extension is not dds, then loader checks if there is a dds file with the same name but dds file extension present in the same folder as the specified fileName. If dds file exist, it is loaded instead of the file specified with fileName. This can greatly improve load performance and memory usage.
Top
See Also