Click or drag to resize
SoTextureReadTexture Method (String, SoTextureFileTypes)

Convenience function that loads the image data from any texture file supported by Open Inventor and returns an OIV.Inventor.Image.SbRasterImage object.

Namespace: OIV.Inventor.Nodes
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public static SbRasterImage ReadTexture(
	string filename,
	SoTextureFileTypes filetype
)

Parameters

filename
Type: SystemString
filetype
Type: OIV.Inventor.NodesSoTextureFileTypes

Return Value

Type: SbRasterImage
Remarks

Returns null if the load fails for any reason.

If the file type is known, you may specify it using the OIV.Inventor.Nodes.SoTexture.FileTypes enum and Open Inventor will use the corresponding image reader. If filetype is UNKNOWN, Open Inventor will try to automatically determine which image reader should be used for the given file.

See Also