Click or drag to resize

SurfaceMeshPrimitiveTexture Property

Gets or sets the texture applied to this primitive when rendering.

Namespace:  AGI.Foundation.Graphics
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 19.5.402.0 (19.5.402.0)
Syntax
public Texture2D Texture { get; set; }

Property Value

Type: Texture2D
Exceptions
ExceptionCondition
InvalidOperationException When TextureFilter is set to a mipmapping filter the new Texture must be mipmap capable.
Remarks

When a Texture is defined, it is modulated with the primitive's Color. In order to show just the texture color, make sure Color is White.

By default, the texture is aligned north and encompasses the bounding extent of the surface mesh. Use TextureMatrix to scale, translate, and/or rotate the texture.

The texture will not show up correctly if SetWithoutTexturing(SurfaceTriangulatorResult) is used to define the surface mesh. When a texturing is desired, always use Set(SurfaceTriangulatorResult) instead of SetWithoutTexturing(SurfaceTriangulatorResult).

If rendering performance is poor when a texture is applied to the surface mesh, it is likely that the texturing is occurring in software instead of hardware. If you experience this, try updating your video card drivers.

See Also