Share via


Texture-Klasse

Dieser Dokumentation für die Vorschau nur ist und in späteren Versionen geändert. Leere Themen wurden als Platzhalter eingefügt.]

Ändert eine Texturressource.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Class Texture _
    Inherits BaseTexture _
    Implements IDisposable
'Usage
Dim instance As Texture
public class Texture : BaseTexture, IDisposable
public ref class Texture : public BaseTexture, 
    IDisposable
type Texture =  
    class
        inherit BaseTexture
        interface IDisposable
    end

Hinweise

Dieses Objekt erbt Funktionalität von BaseTexture.

Beispiele

Im folgenden Codebeispiel veranschaulicht eine Struktur verwenden.

' This code example is taken from the' Direct3D Mobile Texture Sample included with the' .NET Compact Framework samples.
' Called whenever the rendering device is reset.FriendSub OnResetDevice(ByVal sender AsObject, ByVal e As EventArgs)
    Dim dev As Device = CType(sender, Device)
    ' Turn off culling, so we see the front and back of the triangle.
    dev.RenderState.CullMode = Cull.None
    ' Turn off D3D lighting.
    dev.RenderState.Lighting = False    ' Turn on the ZBuffer.
    dev.RenderState.ZBufferEnable = True    ' Turn on perspective correction for textures.    ' This provides a more accurate visual at the cost    ' of a small performance overhead.
    dev.RenderState.TexturePerspective = True    ' Now create the texture.
    texture = TextureLoader.FromStream(dev, _
      [Assembly].GetExecutingAssembly().GetManifestResourceStream("Texture.Content.Banana.bmp"))

EndSub
// This code example is taken from the// Direct3D Mobile Texture Sample included with the// .NET Compact Framework samples.// Called whenever the rendering device is reset.void OnResetDevice(object sender, EventArgs e)
{
    Device dev = (Device)sender;
    // Turn off culling, so we see the front and back of the triangle
    dev.RenderState.CullMode = Cull.None;
    // Turn off D3D lighting
    dev.RenderState.Lighting = false;
    // Turn on the ZBuffer
    dev.RenderState.ZBufferEnable = true;
    // Turn on perspective correction for textures// This provides a more accurate visual at the cost// of a small performance overhead
    dev.RenderState.TexturePerspective = true;
    // Now create our texture

    texture = TextureLoader.FromStream(dev,
        Assembly.GetExecutingAssembly().GetManifestResourceStream(
        "Texture.Content.Banana.bmp"));
}

Vererbungshierarchie

System.Object
  Microsoft.WindowsMobile.DirectX.Direct3D.Resource
    Microsoft.WindowsMobile.DirectX.Direct3D.BaseTexture
      Microsoft.WindowsMobile.DirectX.Direct3D.Texture

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Plattformen

Windows CE, Windows Mobile für Smartphone, Windows Mobile für Pocket PC

Die .NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET framework.

Versionsinformationen

.NET Compact Framework

Unterstützt in: 3.5, 2.0

Siehe auch

Referenz

Member Texture

Microsoft.WindowsMobile.DirectX.Direct3D-Namespace

Weitere Ressourcen

Mobile Direct3D-Programmierung in .NET Compact Framework