| TerrainHelperGetTextureLevelSingle Method |
Gets the texture data of the specified mipmap level as a
Single array.
Namespace: DigitalRune.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static float[] GetTextureLevelSingle(
Texture2D texture,
int level
)
Public Shared Function GetTextureLevelSingle (
texture As Texture2D,
level As Integer
) As Single()
public:
static array<float>^ GetTextureLevelSingle(
Texture2D^ texture,
int level
)
static member GetTextureLevelSingle :
texture : Texture2D *
level : int -> float32[]
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 Remarks
This method can be used with following texture surface formats:
Alpha8, Color,
Rg32, Rgba64,
Single, Vector2,
Vector4, HalfSingle,
HalfVector2, HalfVector4
See Also