ホーム › Graphics.Direct3D9 › IDirect3D9
IDirect3D9
COMメソッド 14
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
vtbl 3 HRESULT RegisterSoftwareDevice(void* pInitializeFunction)
| pInitializeFunction | void* | inout | ソフトウェアラスタライザ初期化関数へのポインタ。プラグインDLLが提供する。 |
vtbl 4 DWORD GetAdapterCount()
vtbl 5 HRESULT GetAdapterIdentifier(DWORD Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier)
| Adapter | DWORD | in | 対象アダプタの序数。0が既定アダプタを表す。 |
| Flags | DWORD | in | 識別情報取得方法を示すフラグ。D3DENUM_WHQL_LEVELなどを指定する。 |
| pIdentifier | D3DADAPTER_IDENTIFIER9* | inout | アダプタ識別情報を受け取るD3DADAPTER_IDENTIFIER9へのポインタ。 |
| Adapter | DWORD | in | 対象アダプタの序数。0が既定アダプタ。 |
| Format | D3DFORMAT | in | 列挙対象とする表示モードのD3DFORMATピクセルフォーマット。 |
vtbl 7 HRESULT EnumAdapterModes(DWORD Adapter, D3DFORMAT Format, DWORD Mode, D3DDISPLAYMODE* pMode)
| Adapter | DWORD | in | 対象アダプタの序数。 |
| Format | D3DFORMAT | in | 列挙対象の表示モードのD3DFORMATピクセルフォーマット。 |
| Mode | DWORD | in | 取得するモードの0始まりのインデックス。 |
| pMode | D3DDISPLAYMODE* | inout | 表示モード情報を受け取るD3DDISPLAYMODE構造体へのポインタ。 |
vtbl 8 HRESULT GetAdapterDisplayMode(DWORD Adapter, D3DDISPLAYMODE* pMode)
| Adapter | DWORD | in | 対象アダプタの序数。 |
| pMode | D3DDISPLAYMODE* | inout | 現在の表示モードを受け取るD3DDISPLAYMODE構造体へのポインタ。 |
vtbl 9 HRESULT CheckDeviceType(DWORD Adapter, D3DDEVTYPE DevType, D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat, BOOL bWindowed)
| Adapter | DWORD | in | 対象アダプタの序数。 |
| DevType | D3DDEVTYPE | in | 確認するデバイス種別を示すD3DDEVTYPE。HALやREFなど。 |
| AdapterFormat | D3DFORMAT | in | アダプタ(ディスプレイ)のD3DFORMATフォーマット。 |
| BackBufferFormat | D3DFORMAT | in | バックバッファのD3DFORMATフォーマット。 |
| bWindowed | BOOL | in | ウィンドウモードか否か。TRUEでウィンドウ、FALSEで全画面。 |
vtbl 10 HRESULT CheckDeviceFormat(DWORD Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat)
| Adapter | DWORD | in | 対象アダプタの序数。 |
| DeviceType | D3DDEVTYPE | in | 確認するデバイス種別を示すD3DDEVTYPE。 |
| AdapterFormat | D3DFORMAT | in | アダプタのD3DFORMATフォーマット。 |
| Usage | DWORD | in | 確認するリソース用途を示すフラグ。RENDERTARGETなどD3DUSAGE値。 |
| RType | D3DRESOURCETYPE | in | 確認対象リソースの種別を示すD3DRESOURCETYPE。 |
| CheckFormat | D3DFORMAT | in | サポート確認するD3DFORMATフォーマット。 |
vtbl 11 HRESULT CheckDeviceMultiSampleType(DWORD Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels)
| Adapter | DWORD | in | 対象アダプタの序数。 |
| DeviceType | D3DDEVTYPE | in | 確認するデバイス種別を示すD3DDEVTYPE。 |
| SurfaceFormat | D3DFORMAT | in | 確認対象サーフェスのD3DFORMATフォーマット。 |
| Windowed | BOOL | in | ウィンドウモードか否か。TRUEでウィンドウ。 |
| MultiSampleType | D3DMULTISAMPLE_TYPE | in | 確認するマルチサンプル種別を示すD3DMULTISAMPLE_TYPE。 |
| pQualityLevels | DWORD* | inout | 利用可能な品質レベル数を受け取るDWORDポインタ。NULL可。 |
vtbl 12 HRESULT CheckDepthStencilMatch(DWORD Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat)
| Adapter | DWORD | in | 対象アダプタの序数。 |
| DeviceType | D3DDEVTYPE | in | 確認するデバイス種別を示すD3DDEVTYPE。 |
| AdapterFormat | D3DFORMAT | in | アダプタのD3DFORMATフォーマット。 |
| RenderTargetFormat | D3DFORMAT | in | レンダーターゲットのD3DFORMATフォーマット。 |
| DepthStencilFormat | D3DFORMAT | in | 深度ステンシルバッファのD3DFORMATフォーマット。 |
vtbl 13 HRESULT CheckDeviceFormatConversion(DWORD Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat)
| Adapter | DWORD | in | 対象アダプタの序数。 |
| DeviceType | D3DDEVTYPE | in | 確認するデバイス種別を示すD3DDEVTYPE。 |
| SourceFormat | D3DFORMAT | in | 変換元のD3DFORMATフォーマット。 |
| TargetFormat | D3DFORMAT | in | 変換先のD3DFORMATフォーマット。 |
vtbl 14 HRESULT GetDeviceCaps(DWORD Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps)
| Adapter | DWORD | in | 対象アダプタの序数。 |
| DeviceType | D3DDEVTYPE | in | 対象デバイス種別を示すD3DDEVTYPE。 |
| pCaps | D3DCAPS9* | inout | デバイス能力情報を受け取るD3DCAPS9構造体へのポインタ。 |
vtbl 15 HMONITOR GetAdapterMonitor(DWORD Adapter)
| Adapter | DWORD | in | モニタハンドルを取得するアダプタの序数。 |
vtbl 16 HRESULT CreateDevice(DWORD Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DDevice9** ppReturnedDeviceInterface)
| Adapter | DWORD | in | デバイスを作成するアダプタの序数。 |
| DeviceType | D3DDEVTYPE | in | 作成するデバイスの種別を示すD3DDEVTYPE。 |
| hFocusWindow | HWND | in | フォーカスウィンドウのハンドル。全画面協調動作に使用する。 |
| BehaviorFlags | DWORD | in | 頂点処理方式など動作を指定するフラグ。HARDWARE_VERTEXPROCESSING等。 |
| pPresentationParameters | D3DPRESENT_PARAMETERS* | inout | プレゼンテーション設定を記述するD3DPRESENT_PARAMETERSへのポインタ。 |
| ppReturnedDeviceInterface | IDirect3DDevice9** | out | 作成されたIDirect3DDevice9のポインタを受け取る出力。 |
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
出力引数:
#define global IID_IDirect3D9 "{81BDCBCA-64D4-426D-AE8D-AD0147F4275C}" #usecom global IDirect3D9 IID_IDirect3D9 "{}" #comfunc global IDirect3D9_RegisterSoftwareDevice 3 sptr #comfunc global IDirect3D9_GetAdapterCount 4 #comfunc global IDirect3D9_GetAdapterIdentifier 5 int,int,var #comfunc global IDirect3D9_GetAdapterModeCount 6 int,int #comfunc global IDirect3D9_EnumAdapterModes 7 int,int,int,var #comfunc global IDirect3D9_GetAdapterDisplayMode 8 int,var #comfunc global IDirect3D9_CheckDeviceType 9 int,int,int,int,int #comfunc global IDirect3D9_CheckDeviceFormat 10 int,int,int,int,int,int #comfunc global IDirect3D9_CheckDeviceMultiSampleType 11 int,int,int,int,int,var #comfunc global IDirect3D9_CheckDepthStencilMatch 12 int,int,int,int,int #comfunc global IDirect3D9_CheckDeviceFormatConversion 13 int,int,int,int #comfunc global IDirect3D9_GetDeviceCaps 14 int,int,var #comfunc global IDirect3D9_GetAdapterMonitor 15 int #comfunc global IDirect3D9_CreateDevice 16 int,int,sptr,int,var,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。#define global IID_IDirect3D9 "{81BDCBCA-64D4-426D-AE8D-AD0147F4275C}" #usecom global IDirect3D9 IID_IDirect3D9 "{}" #comfunc global IDirect3D9_RegisterSoftwareDevice 3 sptr #comfunc global IDirect3D9_GetAdapterCount 4 #comfunc global IDirect3D9_GetAdapterIdentifier 5 int,int,sptr #comfunc global IDirect3D9_GetAdapterModeCount 6 int,int #comfunc global IDirect3D9_EnumAdapterModes 7 int,int,int,sptr #comfunc global IDirect3D9_GetAdapterDisplayMode 8 int,sptr #comfunc global IDirect3D9_CheckDeviceType 9 int,int,int,int,int #comfunc global IDirect3D9_CheckDeviceFormat 10 int,int,int,int,int,int #comfunc global IDirect3D9_CheckDeviceMultiSampleType 11 int,int,int,int,int,sptr #comfunc global IDirect3D9_CheckDepthStencilMatch 12 int,int,int,int,int #comfunc global IDirect3D9_CheckDeviceFormatConversion 13 int,int,int,int #comfunc global IDirect3D9_GetDeviceCaps 14 int,int,sptr #comfunc global IDirect3D9_GetAdapterMonitor 15 int #comfunc global IDirect3D9_CreateDevice 16 int,int,sptr,int,sptr,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。 ; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。