Share via


TextureLoader クラス

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

テクスチャをロードする関数を提供します。

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

構文

'宣言
Public NotInheritable Class TextureLoader
'使用
Dim instance As TextureLoader
public sealed class TextureLoader
public ref class TextureLoader sealed
[<SealedAttribute>]
type TextureLoader =  class end

テクスチャを読み込む方法を次のコード例に示します。

' This code example is taken from the' Direct3D Mobile Texture Sample of the' .NET Compact Framework samples.
' Called whenever the rendering device is reset.PrivateSub OnResetDevice(ByVal sender AsObject, ByVal e As EventArgs) 
    Dim dev As Device = CType(sender, Device)
    ' Turn off culling, to 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, to 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"));
}

継承階層

System.Object
  Microsoft.WindowsMobile.DirectX.Direct3D.TextureLoader

スレッド セーフ

この型のすべてのパブリック 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

参照

参照

TextureLoader メンバー

Microsoft.WindowsMobile.DirectX.Direct3D 名前空間

その他の技術情報

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