Click or drag to resize
DigitalRuneTerrainHelperGetTextureLevelSingle Method
Gets the texture data of the specified mipmap level as a Single array.

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public static float[] GetTextureLevelSingle(
	Texture2D texture,
	int level
)

Parameters

texture
Type: Texture2D
The texture.
level
Type: SystemInt32
The mipmap level to read. Currently only 0 is supported!

Return Value

Type: Single
The array containing the data of the specified mipmap level. (One Single element per pixel. If the texture contains multiple channels, only the first channel (red) is copied.)
Exceptions
ExceptionCondition
ArgumentNullExceptiontexture is .
NotImplementedException Invalid mipmap level. Extracting mipmap levels other than 0 is not yet implemented.
NotSupportedException Texture format is not yet supported.
Remarks

This method can be used with following texture surface formats: Alpha8, Color, Rg32, Rgba64, Single, Vector2, Vector4, HalfSingle, HalfVector2, HalfVector4

See Also