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