Manager.CheckDeviceType メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Manager.CheckDeviceType メソッドの意味・解説 

Manager.CheckDeviceType メソッド

現在のアダプタで、ハードウェア アクセラレータ デバイス使用できるかどうか指定します

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

Public Shared Function CheckDeviceType
 ( _
    adapter As Integer, _
    checkType As DeviceType, _
    displayFormat As Format, _
    backBufferFormat As Format, _
    windowed As Boolean _
) As Boolean
Dim adapter As Integer
Dim checkType As DeviceType
Dim displayFormat As Format
Dim backBufferFormat As Format
Dim windowed As Boolean
Dim returnValue As Boolean

returnValue = Manager.CheckDeviceType(adapter, checkType, displayFormat, backBufferFormat,
 windowed)
public static bool CheckDeviceType
 (
    int adapter,
    DeviceType checkType,
    Format displayFormat,
    Format backBufferFormat,
    bool windowed
)
public:
static bool CheckDeviceType (
    int adapter, 
    DeviceType checkType, 
    Format displayFormat, 
    Format backBufferFormat, 
    bool windowed
)
public static boolean CheckDeviceType (
    int adapter, 
    DeviceType checkType, 
    Format displayFormat, 
    Format backBufferFormat, 
    boolean windowed
)
public static function CheckDeviceType
 (
    adapter : int, 
    checkType : DeviceType, 
    displayFormat : Format, 
    backBufferFormat : Format, 
    windowed : boolean
) : boolean

パラメータ

adapter

照会するディスプレイ アダプタを示す序数。AdapterListCollection.Default は、常にプライマリ ディスプレイ アダプタです。

checkType

デバイス種類識別する DeviceType 列挙体のメンバ

displayFormat

デバイス種類確認されるアダプタの、表示モード形式を示す Format 列挙体のメンバ。たとえば、一部デバイスは、16 ビット/ピクセルモードでのみ動作します

backBufferFormat

バック バッファ形式形式詳細については、Format に関する説明参照してください。この値は、レンダリング形式いずれかであることが必要です。DeviceDisplayMode プロパティ使用すると、現在の形式取得できますウィンドウ表示アプリケーションについては、そのハードウェアカラー変換サポートされていればバック バッファ形式表示モード形式一致していなくてもかまいませんバック バッファ形式使用できるセットには制約ありますが、ランタイムで、任意の有効なバック バッファ形式デスクトップ形式表示できますまた、デバイスは、通常 8 ビット/ピクセルモードでは動作しないため、デスクトップ モード動作することが必要です。

全画面表示アプリケーションでは、カラー変換実行できません。ウィンドウ モードFormatUnknown指定できます

windowed

ウィンドウ表示マルチサンプリング照会する場合true設定します全画面表示マルチサンプリング照会する場合false設定します

戻り値
メソッド正常に実行されて、デバイスがこのアダプタ使用できる場合trueそれ以外場合false

解説解説

HAL (Hardware Abstraction Layer) 対応の種類デバイスではハードウェア アクセラレータが必要です。CheckDeviceType メソッド使用して HAL デバイスサポートできるアプリケーションあります

全画面表示アプリケーションでは、アルファ チャネルを含む displayFormat指定しないでください指定する呼び出し失敗しますアルファ チャネルバック バッファには指定できますが、この 2 つの表形式は他のすべての点では一致している必要があります。たとえば、displayFormat = X1R5G5B5 の場合backBufferFormat の有効値には X1R5G5B5 や A1R5G5B5 などがありますが、R5G6B5 は有効ではありません。

使用例使用例

特定の種類デバイスアダプタ使用できるかどうか確認するコード例次に示します

Public Sub CheckDeviceType()

    ' Test some formats
    IsDeviceTypeOK(Format.X8R8G8B8, Format.A8R8G8B8)

    If result <> Fix(ResultCode.Success) Then
        System.Windows.Forms.MessageBox.Show(String.Format("The
 device check failed:  {0}", result))
    End If

End Sub

Public Function IsDeviceTypeOK(ByVal
 displayFmt As Format, ByVal backbufferFmt
 As Format) As Boolean
    Dim ai As AdapterInformation = Microsoft.WindowsMobile.DirectX.Direct3D.Manager.Adapters.Default

    ' Verify that the device can be used on the default adapter with
 the given surface format
    If Microsoft.WindowsMobile.DirectX.Direct3D.Manager.CheckDeviceType(ai.Adapter,
 DeviceType.Default, displayFmt, backbufferFmt, False) Then
        Return True ' if the call
 succeeds
    End If

    Return False
    ' otherwise fail.  NOTE: HRESULT passed back in result
End Function
public void CheckDeviceType()
{

    // Test some formats
    IsDeviceTypeOK(Format.X8R8G8B8, Format.A8R8G8B8);

    if (result != (int)ResultCode.Success)
        System.Windows.Forms.MessageBox.Show(String.Format("The device check
 failed:  {0}", result));
}

public bool IsDeviceTypeOK(Format displayFmt,
 Format backbufferFmt)
{
    AdapterInformation ai = Microsoft.WindowsMobile.DirectX.Direct3D.Manager.Adapters.Default;

    // Verify that the device can be used on the default adapter with
 the given surface format
    if (Microsoft.WindowsMobile.DirectX.Direct3D.Manager.CheckDeviceType(ai.Adapter,
 DeviceType.Default, displayFmt, backbufferFmt, false))
    {
        return true;    // if
 the call succeeds
    }

    return false;   // otherwise
 fail.  NOTE: HRESULT passed back in result
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Manager クラス
Manager メンバ
Microsoft.WindowsMobile.DirectX.Direct3D 名前空間



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

辞書ショートカット

すべての辞書の索引

Manager.CheckDeviceType メソッドのお隣キーワード
検索ランキング

   

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



Manager.CheckDeviceType メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS