Share via


Texture クラス

[このドキュメントはプレビュー版であり、後のリリースで変更されることがあります。 空白のトピックは、プレースホルダーとして挿入されています。]

テクスチャ リソースを操作します。

名前空間:  Microsoft.WindowsMobile.DirectX.Direct3D
アセンブリ:  Microsoft.WindowsMobile.DirectX (Microsoft.WindowsMobile.DirectX.dll 内)

構文

'宣言
Public Class Texture _
    Inherits BaseTexture _
    Implements IDisposable
'使用
Dim instance As Texture
public class Texture : BaseTexture, IDisposable
public ref class Texture : public BaseTexture, 
    IDisposable
type Texture =  
    class
        inherit BaseTexture
        interface IDisposable
    end

解説

このオブジェクトは、BaseTexture から機能を継承します。

テクスチャを使用する方法を次のコード例に示します。

' 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"));
}

継承階層

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

スレッド セーフ

この型のすべてのパブリック static (Visual Basic では Shared) メンバーは、スレッド セーフです。 インスタンス メンバーの場合は、スレッド セーフであるとは限りません。

プラットフォーム

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。 サポートされているバージョンについては、「.NET フレームワークのシステム要件」を参照してください。

バージョン情報

.NET Compact Framework

サポート対象 : 3.5、2.0

参照

参照

Texture メンバー

Microsoft.WindowsMobile.DirectX.Direct3D 名前空間

その他の技術情報

.NET Compact Framework でモバイル Direct3D プログラミング