次の方法で共有


Device.SetRenderTarget メソッド

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

デバイスの新しいカラー バッファーを設定します。

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

構文

'宣言
Public Sub SetRenderTarget ( _
    renderTarget As Surface, _
    newZStencil As Surface _
)
'使用
Dim instance As Device
Dim renderTarget As Surface
Dim newZStencil As Surface

instance.SetRenderTarget(renderTarget, _
    newZStencil)
public void SetRenderTarget(
    Surface renderTarget,
    Surface newZStencil
)
public:
void SetRenderTarget(
    Surface^ renderTarget, 
    Surface^ newZStencil
)
member SetRenderTarget : 
        renderTarget:Surface * 
        newZStencil:Surface -> unit 

パラメーター

  • newZStencil
    型 : Microsoft.WindowsMobile.DirectX.Direct3D.Surface
    新しいカラー バッファー Surface。nullnull 参照 (Visual Basic では Nothing) に設定すると、対応する renderTarget のカラー バッファーが無効になります。デバイスには、常にカラー バッファーが関連付けられている必要があります。
    新しいレンダリング先のサーフェイスには、少なくとも Usage が指定されている必要があります。

例外

例外 条件
InvalidCallException

メソッドの呼び出しが無効です。renderTarget が null で newZStencil が 0 か、または renderTarget が null でなくレンダリング先が無効です。

解説

デバイスは複数のレンダリング先をサポートできます。一部のハードウェアは、深度ステンシル バッファーとカラー バッファーの互換性をテストします。テストが行われる場合は、デバッグ ビルドでのみ行われます。このメソッドを使用するときは、次の制限が適用されます。

  • レンダリング先と深度ステンシル サーフェイスの MultiSampleType は、同一である必要があります。

  • レンダリング先の形式と深度ステンシル サーフェイスの形式には、互換性が必要です。詳細については、「CheckDepthStencilMatch」を参照してください。

  • 深度ステンシル サーフェイスのサイズは、レンダリング先のサイズ以上である必要があります。

これらの制限は、デバッグ ランタイム使用時に Device のいずれかの描画メソッドが呼び出された場合にのみ確認されます。

.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 名前空間