ホーム › Graphics.Direct3D9 › D3DDEVICEDESC7
D3DDEVICEDESC7
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwDevCaps | DWORD | 4 | +0 | +0 | デバイスのケイパビリティフラグ群。 |
| dpcLineCaps | D3DPRIMCAPS | 56 | +4 | +4 | ライン描画のプリミティブケイパビリティ(D3DPRIMCAPS)。 |
| dpcTriCaps | D3DPRIMCAPS | 56 | +60 | +60 | 三角形描画のプリミティブケイパビリティ(D3DPRIMCAPS)。 |
| dwDeviceRenderBitDepth | DWORD | 4 | +116 | +116 | サポートするレンダリングビット深度のフラグ群。 |
| dwDeviceZBufferBitDepth | DWORD | 4 | +120 | +120 | サポートするZバッファビット深度のフラグ群。 |
| dwMinTextureWidth | DWORD | 4 | +124 | +124 | テクスチャの最小幅。 |
| dwMinTextureHeight | DWORD | 4 | +128 | +128 | テクスチャの最小高さ。 |
| dwMaxTextureWidth | DWORD | 4 | +132 | +132 | テクスチャの最大幅。 |
| dwMaxTextureHeight | DWORD | 4 | +136 | +136 | テクスチャの最大高さ。 |
| dwMaxTextureRepeat | DWORD | 4 | +140 | +140 | テクスチャの最大繰り返し回数。 |
| dwMaxTextureAspectRatio | DWORD | 4 | +144 | +144 | テクスチャの最大アスペクト比。 |
| dwMaxAnisotropy | DWORD | 4 | +148 | +148 | サポートする最大異方性度。 |
| dvGuardBandLeft | FLOAT | 4 | +152 | +152 | ガードバンドの左端座標。 |
| dvGuardBandTop | FLOAT | 4 | +156 | +156 | ガードバンドの上端座標。 |
| dvGuardBandRight | FLOAT | 4 | +160 | +160 | ガードバンドの右端座標。 |
| dvGuardBandBottom | FLOAT | 4 | +164 | +164 | ガードバンドの下端座標。 |
| dvExtentsAdjust | FLOAT | 4 | +168 | +168 | アンチエイリアス時の範囲調整量。 |
| dwStencilCaps | DWORD | 4 | +172 | +172 | ステンシル操作のケイパビリティフラグ群。 |
| dwFVFCaps | DWORD | 4 | +176 | +176 | FVFのケイパビリティフラグ群。 |
| dwTextureOpCaps | DWORD | 4 | +180 | +180 | テクスチャ操作のケイパビリティフラグ群。 |
| wMaxTextureBlendStages | WORD | 2 | +184 | +184 | 最大テクスチャブレンドステージ数(WORD)。 |
| wMaxSimultaneousTextures | WORD | 2 | +186 | +186 | 同時使用可能な最大テクスチャ数(WORD)。 |
| dwMaxActiveLights | DWORD | 4 | +188 | +188 | 同時に有効化できる最大ライト数。 |
| dvMaxVertexW | FLOAT | 4 | +192 | +192 | 頂点のW成分の最大値。 |
| deviceGUID | GUID | 16 | +196 | +196 | デバイスを識別するGUID。 |
| wMaxUserClipPlanes | WORD | 2 | +212 | +212 | ユーザ定義クリップ平面の最大数(WORD)。 |
| wMaxVertexBlendMatrices | WORD | 2 | +214 | +214 | 頂点ブレンドに使用できる最大行列数(WORD)。 |
| dwVertexProcessingCaps | DWORD | 4 | +216 | +216 | 頂点処理のケイパビリティフラグ群。 |
| dwReserved1 | DWORD | 4 | +220 | +220 | 予約フィールド。 |
| dwReserved2 | DWORD | 4 | +224 | +224 | 予約フィールド。 |
| dwReserved3 | DWORD | 4 | +228 | +228 | 予約フィールド。 |
| dwReserved4 | DWORD | 4 | +232 | +232 | 予約フィールド。 |
各言語での定義
#include <windows.h>
// D3DPRIMCAPS (x64 56 / x86 56 バイト)
typedef struct D3DPRIMCAPS {
DWORD dwSize;
DWORD dwMiscCaps;
DWORD dwRasterCaps;
DWORD dwZCmpCaps;
DWORD dwSrcBlendCaps;
DWORD dwDestBlendCaps;
DWORD dwAlphaCmpCaps;
DWORD dwShadeCaps;
DWORD dwTextureCaps;
DWORD dwTextureFilterCaps;
DWORD dwTextureBlendCaps;
DWORD dwTextureAddressCaps;
DWORD dwStippleWidth;
DWORD dwStippleHeight;
} D3DPRIMCAPS;
// D3DDEVICEDESC7 (x64 236 / x86 236 バイト)
typedef struct D3DDEVICEDESC7 {
DWORD dwDevCaps;
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth;
DWORD dwDeviceZBufferBitDepth;
DWORD dwMinTextureWidth;
DWORD dwMinTextureHeight;
DWORD dwMaxTextureWidth;
DWORD dwMaxTextureHeight;
DWORD dwMaxTextureRepeat;
DWORD dwMaxTextureAspectRatio;
DWORD dwMaxAnisotropy;
FLOAT dvGuardBandLeft;
FLOAT dvGuardBandTop;
FLOAT dvGuardBandRight;
FLOAT dvGuardBandBottom;
FLOAT dvExtentsAdjust;
DWORD dwStencilCaps;
DWORD dwFVFCaps;
DWORD dwTextureOpCaps;
WORD wMaxTextureBlendStages;
WORD wMaxSimultaneousTextures;
DWORD dwMaxActiveLights;
FLOAT dvMaxVertexW;
GUID deviceGUID;
WORD wMaxUserClipPlanes;
WORD wMaxVertexBlendMatrices;
DWORD dwVertexProcessingCaps;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwReserved3;
DWORD dwReserved4;
} D3DDEVICEDESC7;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3DPRIMCAPS
{
public uint dwSize;
public uint dwMiscCaps;
public uint dwRasterCaps;
public uint dwZCmpCaps;
public uint dwSrcBlendCaps;
public uint dwDestBlendCaps;
public uint dwAlphaCmpCaps;
public uint dwShadeCaps;
public uint dwTextureCaps;
public uint dwTextureFilterCaps;
public uint dwTextureBlendCaps;
public uint dwTextureAddressCaps;
public uint dwStippleWidth;
public uint dwStippleHeight;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3DDEVICEDESC7
{
public uint dwDevCaps;
public D3DPRIMCAPS dpcLineCaps;
public D3DPRIMCAPS dpcTriCaps;
public uint dwDeviceRenderBitDepth;
public uint dwDeviceZBufferBitDepth;
public uint dwMinTextureWidth;
public uint dwMinTextureHeight;
public uint dwMaxTextureWidth;
public uint dwMaxTextureHeight;
public uint dwMaxTextureRepeat;
public uint dwMaxTextureAspectRatio;
public uint dwMaxAnisotropy;
public float dvGuardBandLeft;
public float dvGuardBandTop;
public float dvGuardBandRight;
public float dvGuardBandBottom;
public float dvExtentsAdjust;
public uint dwStencilCaps;
public uint dwFVFCaps;
public uint dwTextureOpCaps;
public ushort wMaxTextureBlendStages;
public ushort wMaxSimultaneousTextures;
public uint dwMaxActiveLights;
public float dvMaxVertexW;
public Guid deviceGUID;
public ushort wMaxUserClipPlanes;
public ushort wMaxVertexBlendMatrices;
public uint dwVertexProcessingCaps;
public uint dwReserved1;
public uint dwReserved2;
public uint dwReserved3;
public uint dwReserved4;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3DPRIMCAPS
Public dwSize As UInteger
Public dwMiscCaps As UInteger
Public dwRasterCaps As UInteger
Public dwZCmpCaps As UInteger
Public dwSrcBlendCaps As UInteger
Public dwDestBlendCaps As UInteger
Public dwAlphaCmpCaps As UInteger
Public dwShadeCaps As UInteger
Public dwTextureCaps As UInteger
Public dwTextureFilterCaps As UInteger
Public dwTextureBlendCaps As UInteger
Public dwTextureAddressCaps As UInteger
Public dwStippleWidth As UInteger
Public dwStippleHeight As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3DDEVICEDESC7
Public dwDevCaps As UInteger
Public dpcLineCaps As D3DPRIMCAPS
Public dpcTriCaps As D3DPRIMCAPS
Public dwDeviceRenderBitDepth As UInteger
Public dwDeviceZBufferBitDepth As UInteger
Public dwMinTextureWidth As UInteger
Public dwMinTextureHeight As UInteger
Public dwMaxTextureWidth As UInteger
Public dwMaxTextureHeight As UInteger
Public dwMaxTextureRepeat As UInteger
Public dwMaxTextureAspectRatio As UInteger
Public dwMaxAnisotropy As UInteger
Public dvGuardBandLeft As Single
Public dvGuardBandTop As Single
Public dvGuardBandRight As Single
Public dvGuardBandBottom As Single
Public dvExtentsAdjust As Single
Public dwStencilCaps As UInteger
Public dwFVFCaps As UInteger
Public dwTextureOpCaps As UInteger
Public wMaxTextureBlendStages As UShort
Public wMaxSimultaneousTextures As UShort
Public dwMaxActiveLights As UInteger
Public dvMaxVertexW As Single
Public deviceGUID As Guid
Public wMaxUserClipPlanes As UShort
Public wMaxVertexBlendMatrices As UShort
Public dwVertexProcessingCaps As UInteger
Public dwReserved1 As UInteger
Public dwReserved2 As UInteger
Public dwReserved3 As UInteger
Public dwReserved4 As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3DPRIMCAPS(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("dwMiscCaps", wintypes.DWORD),
("dwRasterCaps", wintypes.DWORD),
("dwZCmpCaps", wintypes.DWORD),
("dwSrcBlendCaps", wintypes.DWORD),
("dwDestBlendCaps", wintypes.DWORD),
("dwAlphaCmpCaps", wintypes.DWORD),
("dwShadeCaps", wintypes.DWORD),
("dwTextureCaps", wintypes.DWORD),
("dwTextureFilterCaps", wintypes.DWORD),
("dwTextureBlendCaps", wintypes.DWORD),
("dwTextureAddressCaps", wintypes.DWORD),
("dwStippleWidth", wintypes.DWORD),
("dwStippleHeight", wintypes.DWORD),
]
class D3DDEVICEDESC7(ctypes.Structure):
_fields_ = [
("dwDevCaps", wintypes.DWORD),
("dpcLineCaps", D3DPRIMCAPS),
("dpcTriCaps", D3DPRIMCAPS),
("dwDeviceRenderBitDepth", wintypes.DWORD),
("dwDeviceZBufferBitDepth", wintypes.DWORD),
("dwMinTextureWidth", wintypes.DWORD),
("dwMinTextureHeight", wintypes.DWORD),
("dwMaxTextureWidth", wintypes.DWORD),
("dwMaxTextureHeight", wintypes.DWORD),
("dwMaxTextureRepeat", wintypes.DWORD),
("dwMaxTextureAspectRatio", wintypes.DWORD),
("dwMaxAnisotropy", wintypes.DWORD),
("dvGuardBandLeft", ctypes.c_float),
("dvGuardBandTop", ctypes.c_float),
("dvGuardBandRight", ctypes.c_float),
("dvGuardBandBottom", ctypes.c_float),
("dvExtentsAdjust", ctypes.c_float),
("dwStencilCaps", wintypes.DWORD),
("dwFVFCaps", wintypes.DWORD),
("dwTextureOpCaps", wintypes.DWORD),
("wMaxTextureBlendStages", ctypes.c_ushort),
("wMaxSimultaneousTextures", ctypes.c_ushort),
("dwMaxActiveLights", wintypes.DWORD),
("dvMaxVertexW", ctypes.c_float),
("deviceGUID", GUID),
("wMaxUserClipPlanes", ctypes.c_ushort),
("wMaxVertexBlendMatrices", ctypes.c_ushort),
("dwVertexProcessingCaps", wintypes.DWORD),
("dwReserved1", wintypes.DWORD),
("dwReserved2", wintypes.DWORD),
("dwReserved3", wintypes.DWORD),
("dwReserved4", wintypes.DWORD),
]#[repr(C)]
pub struct D3DPRIMCAPS {
pub dwSize: u32,
pub dwMiscCaps: u32,
pub dwRasterCaps: u32,
pub dwZCmpCaps: u32,
pub dwSrcBlendCaps: u32,
pub dwDestBlendCaps: u32,
pub dwAlphaCmpCaps: u32,
pub dwShadeCaps: u32,
pub dwTextureCaps: u32,
pub dwTextureFilterCaps: u32,
pub dwTextureBlendCaps: u32,
pub dwTextureAddressCaps: u32,
pub dwStippleWidth: u32,
pub dwStippleHeight: u32,
}
#[repr(C)]
pub struct D3DDEVICEDESC7 {
pub dwDevCaps: u32,
pub dpcLineCaps: D3DPRIMCAPS,
pub dpcTriCaps: D3DPRIMCAPS,
pub dwDeviceRenderBitDepth: u32,
pub dwDeviceZBufferBitDepth: u32,
pub dwMinTextureWidth: u32,
pub dwMinTextureHeight: u32,
pub dwMaxTextureWidth: u32,
pub dwMaxTextureHeight: u32,
pub dwMaxTextureRepeat: u32,
pub dwMaxTextureAspectRatio: u32,
pub dwMaxAnisotropy: u32,
pub dvGuardBandLeft: f32,
pub dvGuardBandTop: f32,
pub dvGuardBandRight: f32,
pub dvGuardBandBottom: f32,
pub dvExtentsAdjust: f32,
pub dwStencilCaps: u32,
pub dwFVFCaps: u32,
pub dwTextureOpCaps: u32,
pub wMaxTextureBlendStages: u16,
pub wMaxSimultaneousTextures: u16,
pub dwMaxActiveLights: u32,
pub dvMaxVertexW: f32,
pub deviceGUID: GUID,
pub wMaxUserClipPlanes: u16,
pub wMaxVertexBlendMatrices: u16,
pub dwVertexProcessingCaps: u32,
pub dwReserved1: u32,
pub dwReserved2: u32,
pub dwReserved3: u32,
pub dwReserved4: u32,
}import "golang.org/x/sys/windows"
type D3DPRIMCAPS struct {
dwSize uint32
dwMiscCaps uint32
dwRasterCaps uint32
dwZCmpCaps uint32
dwSrcBlendCaps uint32
dwDestBlendCaps uint32
dwAlphaCmpCaps uint32
dwShadeCaps uint32
dwTextureCaps uint32
dwTextureFilterCaps uint32
dwTextureBlendCaps uint32
dwTextureAddressCaps uint32
dwStippleWidth uint32
dwStippleHeight uint32
}
type D3DDEVICEDESC7 struct {
dwDevCaps uint32
dpcLineCaps D3DPRIMCAPS
dpcTriCaps D3DPRIMCAPS
dwDeviceRenderBitDepth uint32
dwDeviceZBufferBitDepth uint32
dwMinTextureWidth uint32
dwMinTextureHeight uint32
dwMaxTextureWidth uint32
dwMaxTextureHeight uint32
dwMaxTextureRepeat uint32
dwMaxTextureAspectRatio uint32
dwMaxAnisotropy uint32
dvGuardBandLeft float32
dvGuardBandTop float32
dvGuardBandRight float32
dvGuardBandBottom float32
dvExtentsAdjust float32
dwStencilCaps uint32
dwFVFCaps uint32
dwTextureOpCaps uint32
wMaxTextureBlendStages uint16
wMaxSimultaneousTextures uint16
dwMaxActiveLights uint32
dvMaxVertexW float32
deviceGUID windows.GUID
wMaxUserClipPlanes uint16
wMaxVertexBlendMatrices uint16
dwVertexProcessingCaps uint32
dwReserved1 uint32
dwReserved2 uint32
dwReserved3 uint32
dwReserved4 uint32
}type
D3DPRIMCAPS = record
dwSize: DWORD;
dwMiscCaps: DWORD;
dwRasterCaps: DWORD;
dwZCmpCaps: DWORD;
dwSrcBlendCaps: DWORD;
dwDestBlendCaps: DWORD;
dwAlphaCmpCaps: DWORD;
dwShadeCaps: DWORD;
dwTextureCaps: DWORD;
dwTextureFilterCaps: DWORD;
dwTextureBlendCaps: DWORD;
dwTextureAddressCaps: DWORD;
dwStippleWidth: DWORD;
dwStippleHeight: DWORD;
end;
D3DDEVICEDESC7 = record
dwDevCaps: DWORD;
dpcLineCaps: D3DPRIMCAPS;
dpcTriCaps: D3DPRIMCAPS;
dwDeviceRenderBitDepth: DWORD;
dwDeviceZBufferBitDepth: DWORD;
dwMinTextureWidth: DWORD;
dwMinTextureHeight: DWORD;
dwMaxTextureWidth: DWORD;
dwMaxTextureHeight: DWORD;
dwMaxTextureRepeat: DWORD;
dwMaxTextureAspectRatio: DWORD;
dwMaxAnisotropy: DWORD;
dvGuardBandLeft: Single;
dvGuardBandTop: Single;
dvGuardBandRight: Single;
dvGuardBandBottom: Single;
dvExtentsAdjust: Single;
dwStencilCaps: DWORD;
dwFVFCaps: DWORD;
dwTextureOpCaps: DWORD;
wMaxTextureBlendStages: Word;
wMaxSimultaneousTextures: Word;
dwMaxActiveLights: DWORD;
dvMaxVertexW: Single;
deviceGUID: TGUID;
wMaxUserClipPlanes: Word;
wMaxVertexBlendMatrices: Word;
dwVertexProcessingCaps: DWORD;
dwReserved1: DWORD;
dwReserved2: DWORD;
dwReserved3: DWORD;
dwReserved4: DWORD;
end;const D3DPRIMCAPS = extern struct {
dwSize: u32,
dwMiscCaps: u32,
dwRasterCaps: u32,
dwZCmpCaps: u32,
dwSrcBlendCaps: u32,
dwDestBlendCaps: u32,
dwAlphaCmpCaps: u32,
dwShadeCaps: u32,
dwTextureCaps: u32,
dwTextureFilterCaps: u32,
dwTextureBlendCaps: u32,
dwTextureAddressCaps: u32,
dwStippleWidth: u32,
dwStippleHeight: u32,
};
const D3DDEVICEDESC7 = extern struct {
dwDevCaps: u32,
dpcLineCaps: D3DPRIMCAPS,
dpcTriCaps: D3DPRIMCAPS,
dwDeviceRenderBitDepth: u32,
dwDeviceZBufferBitDepth: u32,
dwMinTextureWidth: u32,
dwMinTextureHeight: u32,
dwMaxTextureWidth: u32,
dwMaxTextureHeight: u32,
dwMaxTextureRepeat: u32,
dwMaxTextureAspectRatio: u32,
dwMaxAnisotropy: u32,
dvGuardBandLeft: f32,
dvGuardBandTop: f32,
dvGuardBandRight: f32,
dvGuardBandBottom: f32,
dvExtentsAdjust: f32,
dwStencilCaps: u32,
dwFVFCaps: u32,
dwTextureOpCaps: u32,
wMaxTextureBlendStages: u16,
wMaxSimultaneousTextures: u16,
dwMaxActiveLights: u32,
dvMaxVertexW: f32,
deviceGUID: GUID,
wMaxUserClipPlanes: u16,
wMaxVertexBlendMatrices: u16,
dwVertexProcessingCaps: u32,
dwReserved1: u32,
dwReserved2: u32,
dwReserved3: u32,
dwReserved4: u32,
};type
D3DPRIMCAPS {.bycopy.} = object
dwSize: uint32
dwMiscCaps: uint32
dwRasterCaps: uint32
dwZCmpCaps: uint32
dwSrcBlendCaps: uint32
dwDestBlendCaps: uint32
dwAlphaCmpCaps: uint32
dwShadeCaps: uint32
dwTextureCaps: uint32
dwTextureFilterCaps: uint32
dwTextureBlendCaps: uint32
dwTextureAddressCaps: uint32
dwStippleWidth: uint32
dwStippleHeight: uint32
D3DDEVICEDESC7 {.bycopy.} = object
dwDevCaps: uint32
dpcLineCaps: D3DPRIMCAPS
dpcTriCaps: D3DPRIMCAPS
dwDeviceRenderBitDepth: uint32
dwDeviceZBufferBitDepth: uint32
dwMinTextureWidth: uint32
dwMinTextureHeight: uint32
dwMaxTextureWidth: uint32
dwMaxTextureHeight: uint32
dwMaxTextureRepeat: uint32
dwMaxTextureAspectRatio: uint32
dwMaxAnisotropy: uint32
dvGuardBandLeft: float32
dvGuardBandTop: float32
dvGuardBandRight: float32
dvGuardBandBottom: float32
dvExtentsAdjust: float32
dwStencilCaps: uint32
dwFVFCaps: uint32
dwTextureOpCaps: uint32
wMaxTextureBlendStages: uint16
wMaxSimultaneousTextures: uint16
dwMaxActiveLights: uint32
dvMaxVertexW: float32
deviceGUID: GUID
wMaxUserClipPlanes: uint16
wMaxVertexBlendMatrices: uint16
dwVertexProcessingCaps: uint32
dwReserved1: uint32
dwReserved2: uint32
dwReserved3: uint32
dwReserved4: uint32struct D3DPRIMCAPS
{
uint dwSize;
uint dwMiscCaps;
uint dwRasterCaps;
uint dwZCmpCaps;
uint dwSrcBlendCaps;
uint dwDestBlendCaps;
uint dwAlphaCmpCaps;
uint dwShadeCaps;
uint dwTextureCaps;
uint dwTextureFilterCaps;
uint dwTextureBlendCaps;
uint dwTextureAddressCaps;
uint dwStippleWidth;
uint dwStippleHeight;
}
struct D3DDEVICEDESC7
{
uint dwDevCaps;
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
uint dwDeviceRenderBitDepth;
uint dwDeviceZBufferBitDepth;
uint dwMinTextureWidth;
uint dwMinTextureHeight;
uint dwMaxTextureWidth;
uint dwMaxTextureHeight;
uint dwMaxTextureRepeat;
uint dwMaxTextureAspectRatio;
uint dwMaxAnisotropy;
float dvGuardBandLeft;
float dvGuardBandTop;
float dvGuardBandRight;
float dvGuardBandBottom;
float dvExtentsAdjust;
uint dwStencilCaps;
uint dwFVFCaps;
uint dwTextureOpCaps;
ushort wMaxTextureBlendStages;
ushort wMaxSimultaneousTextures;
uint dwMaxActiveLights;
float dvMaxVertexW;
GUID deviceGUID;
ushort wMaxUserClipPlanes;
ushort wMaxVertexBlendMatrices;
uint dwVertexProcessingCaps;
uint dwReserved1;
uint dwReserved2;
uint dwReserved3;
uint dwReserved4;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3DDEVICEDESC7 サイズ: 236 バイト(x64)
dim st, 59 ; 4byte整数×59(構造体サイズ 236 / 4 切り上げ)
; dwDevCaps : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dpcLineCaps : D3DPRIMCAPS (+4, 56byte) varptr(st)+4 を基点に操作(56byte:入れ子/配列)
; dpcTriCaps : D3DPRIMCAPS (+60, 56byte) varptr(st)+60 を基点に操作(56byte:入れ子/配列)
; dwDeviceRenderBitDepth : DWORD (+116, 4byte) st.29 = 値 / 値 = st.29 (lpoke/lpeek も可)
; dwDeviceZBufferBitDepth : DWORD (+120, 4byte) st.30 = 値 / 値 = st.30 (lpoke/lpeek も可)
; dwMinTextureWidth : DWORD (+124, 4byte) st.31 = 値 / 値 = st.31 (lpoke/lpeek も可)
; dwMinTextureHeight : DWORD (+128, 4byte) st.32 = 値 / 値 = st.32 (lpoke/lpeek も可)
; dwMaxTextureWidth : DWORD (+132, 4byte) st.33 = 値 / 値 = st.33 (lpoke/lpeek も可)
; dwMaxTextureHeight : DWORD (+136, 4byte) st.34 = 値 / 値 = st.34 (lpoke/lpeek も可)
; dwMaxTextureRepeat : DWORD (+140, 4byte) st.35 = 値 / 値 = st.35 (lpoke/lpeek も可)
; dwMaxTextureAspectRatio : DWORD (+144, 4byte) st.36 = 値 / 値 = st.36 (lpoke/lpeek も可)
; dwMaxAnisotropy : DWORD (+148, 4byte) st.37 = 値 / 値 = st.37 (lpoke/lpeek も可)
; dvGuardBandLeft : FLOAT (+152, 4byte) st.38 = 値 / 値 = st.38 (lpoke/lpeek も可)
; dvGuardBandTop : FLOAT (+156, 4byte) st.39 = 値 / 値 = st.39 (lpoke/lpeek も可)
; dvGuardBandRight : FLOAT (+160, 4byte) st.40 = 値 / 値 = st.40 (lpoke/lpeek も可)
; dvGuardBandBottom : FLOAT (+164, 4byte) st.41 = 値 / 値 = st.41 (lpoke/lpeek も可)
; dvExtentsAdjust : FLOAT (+168, 4byte) st.42 = 値 / 値 = st.42 (lpoke/lpeek も可)
; dwStencilCaps : DWORD (+172, 4byte) st.43 = 値 / 値 = st.43 (lpoke/lpeek も可)
; dwFVFCaps : DWORD (+176, 4byte) st.44 = 値 / 値 = st.44 (lpoke/lpeek も可)
; dwTextureOpCaps : DWORD (+180, 4byte) st.45 = 値 / 値 = st.45 (lpoke/lpeek も可)
; wMaxTextureBlendStages : WORD (+184, 2byte) wpoke st,184,値 / 値 = wpeek(st,184)
; wMaxSimultaneousTextures : WORD (+186, 2byte) wpoke st,186,値 / 値 = wpeek(st,186)
; dwMaxActiveLights : DWORD (+188, 4byte) st.47 = 値 / 値 = st.47 (lpoke/lpeek も可)
; dvMaxVertexW : FLOAT (+192, 4byte) st.48 = 値 / 値 = st.48 (lpoke/lpeek も可)
; deviceGUID : GUID (+196, 16byte) varptr(st)+196 を基点に操作(16byte:入れ子/配列)
; wMaxUserClipPlanes : WORD (+212, 2byte) wpoke st,212,値 / 値 = wpeek(st,212)
; wMaxVertexBlendMatrices : WORD (+214, 2byte) wpoke st,214,値 / 値 = wpeek(st,214)
; dwVertexProcessingCaps : DWORD (+216, 4byte) st.54 = 値 / 値 = st.54 (lpoke/lpeek も可)
; dwReserved1 : DWORD (+220, 4byte) st.55 = 値 / 値 = st.55 (lpoke/lpeek も可)
; dwReserved2 : DWORD (+224, 4byte) st.56 = 値 / 値 = st.56 (lpoke/lpeek も可)
; dwReserved3 : DWORD (+228, 4byte) st.57 = 値 / 値 = st.57 (lpoke/lpeek も可)
; dwReserved4 : DWORD (+232, 4byte) st.58 = 値 / 値 = st.58 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global D3DPRIMCAPS
#field int dwSize
#field int dwMiscCaps
#field int dwRasterCaps
#field int dwZCmpCaps
#field int dwSrcBlendCaps
#field int dwDestBlendCaps
#field int dwAlphaCmpCaps
#field int dwShadeCaps
#field int dwTextureCaps
#field int dwTextureFilterCaps
#field int dwTextureBlendCaps
#field int dwTextureAddressCaps
#field int dwStippleWidth
#field int dwStippleHeight
#endstruct
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global D3DDEVICEDESC7
#field int dwDevCaps
#field D3DPRIMCAPS dpcLineCaps
#field D3DPRIMCAPS dpcTriCaps
#field int dwDeviceRenderBitDepth
#field int dwDeviceZBufferBitDepth
#field int dwMinTextureWidth
#field int dwMinTextureHeight
#field int dwMaxTextureWidth
#field int dwMaxTextureHeight
#field int dwMaxTextureRepeat
#field int dwMaxTextureAspectRatio
#field int dwMaxAnisotropy
#field float dvGuardBandLeft
#field float dvGuardBandTop
#field float dvGuardBandRight
#field float dvGuardBandBottom
#field float dvExtentsAdjust
#field int dwStencilCaps
#field int dwFVFCaps
#field int dwTextureOpCaps
#field short wMaxTextureBlendStages
#field short wMaxSimultaneousTextures
#field int dwMaxActiveLights
#field float dvMaxVertexW
#field GUID deviceGUID
#field short wMaxUserClipPlanes
#field short wMaxVertexBlendMatrices
#field int dwVertexProcessingCaps
#field int dwReserved1
#field int dwReserved2
#field int dwReserved3
#field int dwReserved4
#endstruct
stdim st, D3DDEVICEDESC7 ; NSTRUCT 変数を確保
st->dwDevCaps = 100
mes "dwDevCaps=" + st->dwDevCaps