次の方法で共有


Device.RenderState プロパティ

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

デバイスのレンダリング状態の値を取得します。

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

構文

'宣言
Public ReadOnly Property RenderState As RenderStateManager
    Get
'使用
Dim instance As Device
Dim value As RenderStateManager

value = instance.RenderState
public RenderStateManager RenderState { get; }
public:
property RenderStateManager^ RenderState {
    RenderStateManager^ get ();
}
member RenderState : RenderStateManager

プロパティ値

型 : Microsoft.WindowsMobile.DirectX.Direct3D.RenderStateManager
デバイスの RenderStateManager 構造体を返します。

RenderState プロパティの使用方法を次の例に示します。

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

.NET Framework セキュリティ

プラットフォーム

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

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

バージョン情報

.NET Compact Framework

サポート対象 : 3.5、2.0

参照

参照

Device クラス

Device メンバー

Microsoft.WindowsMobile.DirectX.Direct3D 名前空間