SurfaceMeshPrimitiveTexture Property |
Namespace: AGI.Foundation.Graphics
Exception | Condition |
---|---|
InvalidOperationException | When TextureFilter is set to a mipmapping filter the new Texture must be mipmap capable. |
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.