| TerrainHelperCreateHoleTexture Method |
Creates a hole map which can be used for terrain rendering.
Namespace: DigitalRune.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static void CreateHoleTexture(
GraphicsDevice graphicsDevice,
float[] data,
int textureWidth,
int textureHeight,
bool useNearestNeighborFilter,
ref Texture2D holeTexture
)
Public Shared Sub CreateHoleTexture (
graphicsDevice As GraphicsDevice,
data As Single(),
textureWidth As Integer,
textureHeight As Integer,
useNearestNeighborFilter As Boolean,
ByRef holeTexture As Texture2D
)
public:
static void CreateHoleTexture(
GraphicsDevice^ graphicsDevice,
array<float>^ data,
int textureWidth,
int textureHeight,
bool useNearestNeighborFilter,
Texture2D^% holeTexture
)
static member CreateHoleTexture :
graphicsDevice : GraphicsDevice *
data : float32[] *
textureWidth : int *
textureHeight : int *
useNearestNeighborFilter : bool *
holeTexture : Texture2D byref -> unit
Parameters
- graphicsDevice
- Type: GraphicsDevice
The graphics device. - data
- Type: SystemSingle
An array with hole information (1 = no hole, 0 = hole). - textureWidth
- Type: SystemInt32
The width of the texture. - textureHeight
- Type: SystemInt32
The height of the texture. - useNearestNeighborFilter
- Type: SystemBoolean
to use nearest-neighbor filtering (= every second pixel is dropped)
for creating mipmaps. to use a 3x3 filter (default).
- holeTexture
- Type: Texture2D
The created height texture. If this parameter is set to a matching texture, then the content
of this texture is updated and no new texture is created. (If this method is called with a
texture with wrong size or format, an exception is thrown.)
Exceptions See Also