deviceとは? わかりやすく解説

Device イベント


Device クラス

シーン内のすべてのグラフィカル オブジェクトの親オブジェクト

名前空間: Microsoft.WindowsMobile.DirectX.Direct3D
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)
構文構文

解説解説
使用例使用例

デバイス作成するコード例次に示します

Public Class Form1
    Inherits Form
    ' Global variables for this project.
    Private device As Device = Nothing
    ' Rendering device.
    Public Sub New()
        ' Set the initial size and caption of the form.
        Me.ClientSize = New System.Drawing.Size(400,
 300)
        Me.Text = "D3D Tutorial 01: CreateDevice"

    End Sub 'New


    Public Function InitializeGraphics() As
 Boolean
        Try
            ' Setup Direct3D.
            Dim presentParams As New
 PresentParameters()
            presentParams.Windowed = True
            presentParams.SwapEffect = SwapEffect.Discard
            device = New Device(0, DeviceType.Default, Me,
 CreateFlags.None, presentParams)
            Return True
        Catch
            Return False
        End Try

    End Function

    Private Sub Render()
        If device Is Nothing
 Then
            Return
        End If
        'Clear the backbuffer to a blue color. 
        device.Clear(ClearFlags.Target, System.Drawing.Color.Blue, 1.0F, 0)
        'Begin the scene
        device.BeginScene()

        'Rendering of scene objects can happen here.
        'End the scene
        device.EndScene()
        device.Present()

    End Sub

    Protected Overrides Sub
 OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
        Me.Render()
        ' Render on painting.
    End Sub

    Protected Overrides Sub
 OnKeyPress(ByVal e As System.Windows.Forms.KeyPressEventArgs)
        If Fix(System.Convert.ToByte(e.KeyChar)) = Fix(System.Windows.Forms.Keys.Escape)
 Then
            Me.Close() ' Esc was pressed
        End If

    End Sub

    Shared Sub Main()

        Dim DeviceForm As New
 Form1()
        Try
            If Not DeviceForm.InitializeGraphics()
 Then
                ' Initialize Direct3D
                MsgBox("Could not initialize Direct3D.  This tutorial
 will exit.")
                Return
            End If
            DeviceForm.Show()

            'While the form is still valid, render and process messages
            'While DeviceForm.Created
            '    DeviceForm.Render()
            '    Application.DoEvents()
            'End While
        Finally
            DeviceForm.Dispose()
        End Try

    End Sub
End Class
public class CreateDevice : Form
{
    // Our global variables for this project
    Device device = null; // Our rendering device

    public CreateDevice()
    {
        // Set the initial size of our form
        this.ClientSize = new System.Drawing.Size(400,
 300);
        // And it's caption
        this.Text = "D3D Tutorial 01: CreateDevice";
    }

    public bool InitializeGraphics()
    {
        try
        {
            // Now let's setup our D3D stuff
            PresentParameters presentParams = new PresentParameters();
            presentParams.Windowed = true;
            presentParams.SwapEffect = SwapEffect.Discard;
            device = new Device(0, DeviceType.Default, this,
 CreateFlags.None, presentParams);
            return true;
        }
        catch (DirectXException)
        {
            return false;
        }
    }
    private void Render()
    {
        if (device == null)
            return;

        //Clear the backbuffer to a blue color 
        device.Clear(ClearFlags.Target, System.Drawing.Color.Blue, 1.0f, 0);
        //Begin the scene
        device.BeginScene();

        // Rendering of scene objects can happen here

        //End the scene
        device.EndScene();
        device.Present();
    }
    protected override void OnPaint(System.Windows.Forms.PaintEventArgs
 e)
    {
        this.Render(); // Render on painting
    }
    protected override void OnKeyPress(System.Windows.Forms.KeyPressEventArgs
 e)
    {
        if ((int)(byte)e.KeyChar == (int)System.Windows.Forms.Keys.Escape)
            this.Close(); // Esc was pressed
    }

    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    static void Main()
    {

        using (CreateDevice DeviceForm = new
 CreateDevice())
        {
            if (!DeviceForm.InitializeGraphics()) //
 Initialize Direct3D
            {
                MessageBox.Show("Could not initialize Direct3D.  This tutorial
 will exit.");
                return;
            }
            DeviceForm.Show();

            // While the form is still valid, render and process messages
            //while (DeviceForm.Created)
            //{
                DeviceForm.Render();
                Application.DoEvents();
            //}
        }
    }
}
継承階層継承階層
System.Object
   Microsoft.WindowsMobile.DirectX.Direct3D.BaseMesh
    Microsoft.WindowsMobile.DirectX.Direct3D.Device
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Device コンストラクタ

Device 構造体新しインスタンス初期化します。

デバイスは、子ウィンドウでは作成できません。


オーバーロードの一覧オーバーロードの一覧
名前 説明
Device (Int32, DeviceType, Control, CreateFlags, PresentParameters) Device 構造体新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

Device (Int32, DeviceType, IntPtr, CreateFlags, PresentParameters) Device 構造体新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

参照参照

関連項目

Device クラス
Device メンバ
Microsoft.WindowsMobile.DirectX.Direct3D 名前空間

Device コンストラクタ (Int32, DeviceType, Control, CreateFlags, PresentParameters)

Device 構造体新しインスタンス初期化します。

名前空間: Microsoft.WindowsMobile.DirectX.Direct3D
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)
構文構文

Public Sub New ( _
    adapter As Integer, _
    deviceType As DeviceType, _
    renderWindow As Control, _
    behaviorFlags As CreateFlags, _
    presentationParameters As PresentParameters _
)
Dim adapter As Integer
Dim deviceType As DeviceType
Dim renderWindow As Control
Dim behaviorFlags As CreateFlags
Dim presentationParameters As PresentParameters

Dim instance As New Device(adapter,
 deviceType, renderWindow, behaviorFlags, presentationParameters)
public Device (
    int adapter,
    DeviceType deviceType,
    Control renderWindow,
    CreateFlags behaviorFlags,
    PresentParameters presentationParameters
)
public:
Device (
    int adapter, 
    DeviceType deviceType, 
    Control^ renderWindow, 
    CreateFlags behaviorFlags, 
    PresentParameters^ presentationParameters
)
public Device (
    int adapter, 
    DeviceType deviceType, 
    Control renderWindow, 
    CreateFlags behaviorFlags, 
    PresentParameters presentationParameters
)
public function Device (
    adapter : int, 
    deviceType : DeviceType, 
    renderWindow : Control, 
    behaviorFlags : CreateFlags, 
    presentationParameters : PresentParameters
)

パラメータ

adapter

オブジェクトが表す物理デバイスを示す序数デバイス 0 は、既定デバイスです。このパラメータ使用できる最大値は、物理デバイス総数から 1 を引いた値です。

deviceType

目的デバイス種類を示す DeviceType 列挙型メンバ目的デバイス種類使用できない場合メソッド失敗します

renderWindow

Form または他の Control 派生クラス識別するハンドル。このパラメータは、デバイスバインドするサーフェイス示します

指定するウィンドウは、トップレベル ウィンドウである必要がありますNull 値はサポートされません。

behaviorFlags

デバイス作成制御する 1 つ上のオプション組み合わせ

presentationParameters

作成するデバイスプレゼンテーション パラメータ記述する PresentParameters オブジェクト

解説解説

このコンストラクタは、必要な表示モード (またはウィンドウ モード) に設定され適切なバック バッファ割り当てられた、すべての機能を持つデバイス オブジェクト作成しますアプリケーション深度バッファ作成し設定するだけで、レンダリング開始できます

デバイス一部として作成されバック バッファは、PresentParameters で LockableBackBuffer が指定されている場合にのみロックできます。マルチサンプル バック バッファ深度サーフェイスロックできません。

Reset メソッドと TestCooperativeLevel メソッドは、このメソッド使用してデバイス作成したスレッドから呼び出される必要があります

ウィンドウ モード場合DeviceReset、および SwapChain を呼び出すと (新しスワップ チェーン作成するためにコンストラクタオーバーライドすると)、バック バッファ形式Unknown指定できます。つまり、ウィンドウ モード場合は、アプリケーションデバイス呼び出す前に現在のデスクトップ形式照会する要はありません。全画面表示モード場合は、バック バッファ形式指定する必要があります

デバイスは、子ウィンドウおよびサイズが 0 × 0 のウィンドウでは作成できません。

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Device クラス
Device メンバ
Microsoft.WindowsMobile.DirectX.Direct3D 名前空間

Device コンストラクタ (Int32, DeviceType, IntPtr, CreateFlags, PresentParameters)

Device 構造体新しインスタンス初期化します。

名前空間: Microsoft.WindowsMobile.DirectX.Direct3D
アセンブリ: Microsoft.WindowsMobile.DirectX (microsoft.windowsmobile.directx.dll 内)
構文構文

Public Sub New ( _
    adapter As Integer, _
    deviceType As DeviceType, _
    renderWindowHandle As IntPtr, _
    behaviorFlags As CreateFlags, _
    presentationParameters As PresentParameters _
)
Dim adapter As Integer
Dim deviceType As DeviceType
Dim renderWindowHandle As IntPtr
Dim behaviorFlags As CreateFlags
Dim presentationParameters As PresentParameters

Dim instance As New Device(adapter,
 deviceType, renderWindowHandle, behaviorFlags, presentationParameters)
public Device (
    int adapter,
    DeviceType deviceType,
    IntPtr renderWindowHandle,
    CreateFlags behaviorFlags,
    PresentParameters presentationParameters
)
public:
Device (
    int adapter, 
    DeviceType deviceType, 
    IntPtr renderWindowHandle, 
    CreateFlags behaviorFlags, 
    PresentParameters^ presentationParameters
)
public Device (
    int adapter, 
    DeviceType deviceType, 
    IntPtr renderWindowHandle, 
    CreateFlags behaviorFlags, 
    PresentParameters presentationParameters
)
public function Device (
    adapter : int, 
    deviceType : DeviceType, 
    renderWindowHandle : IntPtr, 
    behaviorFlags : CreateFlags, 
    presentationParameters : PresentParameters
)

パラメータ

adapter

オブジェクトが表す物理デバイスを示す序数デバイス 0 は、既定デバイスです。このパラメータ使用できる最大値は、物理デバイス総数から 1 を引いた値です。

deviceType

目的デバイス種類を示す DeviceType 列挙型メンバ目的デバイス種類使用できない場合メソッド失敗します

renderWindowHandle

アンマネージ ウィンドウ ハンドルまたは Windows フォーム以外のウィンドウ ハンドルへのポインタ指定するウィンドウは、トップレベル ウィンドウである必要がありますnull 値サポートされていません。

behaviorFlags

デバイス作成制御する 1 つ上のオプション組み合わせ

presentationParameters

作成するデバイスプレゼンテーション パラメータ記述する PresentParameters オブジェクト

解説解説

このコンストラクタは、必要な表示モード (またはウィンドウ モード) に設定され適切なバック バッファ割り当てられた、すべての機能を持つデバイス オブジェクト作成しますアプリケーション深度バッファ作成し設定するだけで、レンダリング開始できます

デバイス一部として作成されバック バッファは、PresentParameters で LockableBackBuffer が指定されている場合にのみロックできます。マルチサンプル バック バッファ深度サーフェイスロックできません。

Reset メソッドと TestCooperativeLevel メソッドは、このメソッド使用してデバイス作成したスレッドから呼び出される必要があります

ウィンドウ モード場合DeviceReset、および SwapChain を呼び出すと (新しスワップ チェーン作成するためにコンストラクタオーバーライドすると)、バック バッファ形式Unknown指定できます。つまり、ウィンドウ モード場合は、アプリケーションデバイス呼び出す前に現在のデスクトップ形式照会する要はありません。全画面表示モード場合は、バック バッファ形式指定する必要があります

サイズが 0 × 0 のウィンドウデバイス作成しようとした場合Device メソッド失敗します

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Device クラス
Device メンバ
Microsoft.WindowsMobile.DirectX.Direct3D 名前空間

Device プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ Viewport 現在のデバイスのビューポート パラメータ取得または設定します
参照参照

関連項目

Device クラス
Microsoft.WindowsMobile.DirectX.Direct3D 名前空間

その他の技術情報

Mobile Direct3D プログラミング

Device メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド BeginScene シーン開始表します
パブリック メソッド CheckCooperativeLevel オーバーロードされますウィンドウ アプリケーションまたは全画面表示アプリケーションでの Direct3D デバイス現在の協調レベル ステータス報告します
パブリック メソッド Clear オーバーロードされます。 ビューポートまたはビューポート内の四角形セット指定RGBA 色にクリアし、深度バッファクリアし、ステンシル バッファ消去します。
パブリック メソッド ColorFill アプリケーション四角形領域指定した色で塗りつぶせるようにします。
パブリック メソッド CopyRects オーバーロードされますSurface指定した位置1 つ上の Rectangle オブジェクトコピーします
パブリック メソッド CreateDepthStencilSurface 深度ステンシル リソース作成します
パブリック メソッド CreateImageSurface Surface作成します
パブリック メソッド CreateRenderTarget レンダリング先のサーフェイス作成します
パブリック メソッド Dispose Device によって使用されているすべてのリソース解放します。このクラス継承できません。
パブリック メソッド DrawIndexedPrimitives 頂点配列へのインデックス基づいて指定されジオメトリ プリミティブレンダリングます。
パブリック メソッド DrawPrimitives 現在のデータ入力ストリーム セットから、指定した種類の非インデックスつきのジオメトリ プリミティブシーケンスレンダリングます。
パブリック メソッド EndScene BeginScene メソッド呼び出しによって開始されシーン終了します
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド GetAvailablePoolMem Pool 列挙体に使用できるメモリ取得します
パブリック メソッド GetBackBuffer 指定したバック バッファ取得します
パブリック メソッド GetFrontBuffer デバイスフロント バッファコピー生成しアプリケーションによって提供されるシステム メモリ バッファ格納します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetInfo デバイスに関するドライバ情報取得します
パブリック メソッド GetPaletteEntries パレット エントリ取得します
パブリック メソッド GetStreamSource 指定したデータ ストリームバインドされている頂点バッファ取得します
パブリック メソッド GetTexture デバイスステージ割り当てられているテクスチャ取得します
パブリック メソッド GetTransform 変換状態を記述する行列取得します
パブリック メソッド GetTransformFixed 固定小数点演算使用する処理の変換状態を記述する行列取得します
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド Present オーバーロードされますデバイス所有するバック バッファシーケンスの中で次のバッファ内容表示します
パブリック メソッド ProcessVertices 頂点シェーダ定義されている頂点処理を一連の入力データ ストリーム適用しインターリーブされた頂点データ単一ストリーム転送先の頂点バッファ生成します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド Reset 現在のデバイスプレゼンテーション パラメータリセットします。
パブリック メソッド ResourceManagerDiscardBytes ビデオ プールメモリバイト破棄するようにドライバ指示します
パブリック メソッド SetPaletteEntries パレット エントリ設定します
パブリック メソッド SetRenderTarget デバイス新しカラー バッファ設定します
パブリック メソッド SetStreamSource 頂点バッファデバイスデータ ストリームバインドます。
パブリック メソッド SetTexture テクスチャデバイス ステージ割り当てます
パブリック メソッド SetTransform 変更対象変換の種類
パブリック メソッド SetTransformFixed 固定小数点演算での、変更対象変換の種類
パブリック メソッド StretchRectangle 転送四角形内容転送四角形コピーします
パブリック メソッド TestCooperativeLevel ウィンドウ アプリケーションまたは全画面表示アプリケーションでの Direct3D デバイス現在の協調レベル ステータス報告します
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
パブリック メソッド UpdateTexture テクスチャダーティ部分更新します
パブリック メソッド ValidateDevice デバイスが、現在のテクスチャ ブレンディング処理と引数単一パスレンダリングする機能報告します
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

Device クラス
Microsoft.WindowsMobile.DirectX.Direct3D 名前空間

その他の技術情報

Mobile Direct3D プログラミング

Device メンバ

シーン内のすべてのグラフィカル オブジェクトの親オブジェクト

Device データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ Viewport 現在のデバイスのビューポート パラメータ取得または設定します
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド BeginScene シーン開始表します
パブリック メソッド CheckCooperativeLevel オーバーロードされますウィンドウ アプリケーションまたは全画面表示アプリケーションでの Direct3D デバイス現在の協調レベル ステータス報告します
パブリック メソッド Clear オーバーロードされます。 ビューポートまたはビューポート内の四角形セット指定RGBA 色にクリアし、深度バッファクリアし、ステンシル バッファ消去します。
パブリック メソッド ColorFill アプリケーション四角形領域指定した色で塗りつぶせるようにします。
パブリック メソッド CopyRects オーバーロードされますSurface指定した位置1 つ上の Rectangle オブジェクトコピーします
パブリック メソッド CreateDepthStencilSurface 深度ステンシル リソース作成します
パブリック メソッド CreateImageSurface Surface作成します
パブリック メソッド CreateRenderTarget レンダリング先のサーフェイス作成します
パブリック メソッド Dispose Device によって使用されているすべてのリソース解放します。このクラス継承できません。
パブリック メソッド DrawIndexedPrimitives 頂点配列へのインデックス基づいて指定されジオメトリ プリミティブレンダリングます。
パブリック メソッド DrawPrimitives 現在のデータ入力ストリーム セットから、指定した種類の非インデックスつきのジオメトリ プリミティブシーケンスレンダリングます。
パブリック メソッド EndScene BeginScene メソッド呼び出しによって開始されシーン終了します
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド GetAvailablePoolMem Pool 列挙体に使用できるメモリ取得します
パブリック メソッド GetBackBuffer 指定したバック バッファ取得します
パブリック メソッド GetFrontBuffer デバイスフロント バッファコピー生成しアプリケーションによって提供されるシステム メモリ バッファ格納します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetInfo デバイスに関するドライバ情報取得します
パブリック メソッド GetPaletteEntries パレット エントリ取得します
パブリック メソッド GetStreamSource 指定したデータ ストリームバインドされている頂点バッファ取得します
パブリック メソッド GetTexture デバイスステージ割り当てられているテクスチャ取得します
パブリック メソッド GetTransform 変換状態を記述する行列取得します
パブリック メソッド GetTransformFixed 固定小数点演算使用する処理の変換状態を記述する行列取得します
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド Present オーバーロードされますデバイス所有するバック バッファシーケンスの中で次のバッファ内容表示します
パブリック メソッド ProcessVertices 頂点シェーダ定義されている頂点処理を一連の入力データ ストリーム適用しインターリーブされた頂点データ単一ストリーム転送先の頂点バッファ生成します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド Reset 現在のデバイスプレゼンテーション パラメータリセットします。
パブリック メソッド ResourceManagerDiscardBytes ビデオ プールメモリバイト破棄するようにドライバ指示します
パブリック メソッド SetPaletteEntries パレット エントリ設定します
パブリック メソッド SetRenderTarget デバイス新しカラー バッファ設定します
パブリック メソッド SetStreamSource 頂点バッファデバイスデータ ストリームバインドます。
パブリック メソッド SetTexture テクスチャデバイス ステージ割り当てます
パブリック メソッド SetTransform 変更対象変換の種類
パブリック メソッド SetTransformFixed 固定小数点演算での、変更対象変換の種類
パブリック メソッド StretchRectangle 転送四角形内容転送四角形コピーします
パブリック メソッド TestCooperativeLevel ウィンドウ アプリケーションまたは全画面表示アプリケーションでの Direct3D デバイス現在の協調レベル ステータス報告します
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
パブリック メソッド UpdateTexture テクスチャダーティ部分更新します
パブリック メソッド ValidateDevice デバイスが、現在のテクスチャ ブレンディング処理と引数単一パスレンダリングする機能報告します
プロテクト メソッドプロテクト メソッド
パブリック イベントパブリック イベント
参照参照

関連項目

Device クラス
Microsoft.WindowsMobile.DirectX.Direct3D 名前空間

その他の技術情報

Mobile Direct3D プログラミング


このページでは「.NET Framework クラス ライブラリ リファレンス」からdeviceを検索した結果を表示しています。
Weblioに収録されているすべての辞書からdeviceを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からdevice を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「device」の関連用語



3
74% |||||


5
アイ‐ユー‐シー‐ディー デジタル大辞泉
74% |||||

6
アイ‐ユー‐ディー デジタル大辞泉
74% |||||

7
エス‐エム‐ディー デジタル大辞泉
74% |||||

8
エス‐ピー‐ディー デジタル大辞泉
74% |||||

9
サムディー デジタル大辞泉
74% |||||

10
パワー素子 デジタル大辞泉
74% |||||

deviceのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



deviceのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS