ホーム › Graphics.Direct3D9 › D3DPROCESSVERTICES
D3DPROCESSVERTICES
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwFlags | DWORD | 4 | +0 | +0 | 頂点処理の挙動を制御するフラグ群。 |
| wStart | WORD | 2 | +4 | +4 | 処理を開始するソース頂点インデックス(WORD)。 |
| wDest | WORD | 2 | +6 | +6 | 結果を格納する先頭の出力頂点インデックス(WORD)。 |
| dwCount | DWORD | 4 | +8 | +8 | 処理する頂点の数。 |
| dwReserved | DWORD | 4 | +12 | +12 | 予約フィールド。0でなければならない。 |
各言語での定義
#include <windows.h>
// D3DPROCESSVERTICES (x64 16 / x86 16 バイト)
typedef struct D3DPROCESSVERTICES {
DWORD dwFlags;
WORD wStart;
WORD wDest;
DWORD dwCount;
DWORD dwReserved;
} D3DPROCESSVERTICES;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3DPROCESSVERTICES
{
public uint dwFlags;
public ushort wStart;
public ushort wDest;
public uint dwCount;
public uint dwReserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3DPROCESSVERTICES
Public dwFlags As UInteger
Public wStart As UShort
Public wDest As UShort
Public dwCount As UInteger
Public dwReserved As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3DPROCESSVERTICES(ctypes.Structure):
_fields_ = [
("dwFlags", wintypes.DWORD),
("wStart", ctypes.c_ushort),
("wDest", ctypes.c_ushort),
("dwCount", wintypes.DWORD),
("dwReserved", wintypes.DWORD),
]#[repr(C)]
pub struct D3DPROCESSVERTICES {
pub dwFlags: u32,
pub wStart: u16,
pub wDest: u16,
pub dwCount: u32,
pub dwReserved: u32,
}import "golang.org/x/sys/windows"
type D3DPROCESSVERTICES struct {
dwFlags uint32
wStart uint16
wDest uint16
dwCount uint32
dwReserved uint32
}type
D3DPROCESSVERTICES = record
dwFlags: DWORD;
wStart: Word;
wDest: Word;
dwCount: DWORD;
dwReserved: DWORD;
end;const D3DPROCESSVERTICES = extern struct {
dwFlags: u32,
wStart: u16,
wDest: u16,
dwCount: u32,
dwReserved: u32,
};type
D3DPROCESSVERTICES {.bycopy.} = object
dwFlags: uint32
wStart: uint16
wDest: uint16
dwCount: uint32
dwReserved: uint32struct D3DPROCESSVERTICES
{
uint dwFlags;
ushort wStart;
ushort wDest;
uint dwCount;
uint dwReserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3DPROCESSVERTICES サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; dwFlags : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; wStart : WORD (+4, 2byte) wpoke st,4,値 / 値 = wpeek(st,4)
; wDest : WORD (+6, 2byte) wpoke st,6,値 / 値 = wpeek(st,6)
; dwCount : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwReserved : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3DPROCESSVERTICES
#field int dwFlags
#field short wStart
#field short wDest
#field int dwCount
#field int dwReserved
#endstruct
stdim st, D3DPROCESSVERTICES ; NSTRUCT 変数を確保
st->dwFlags = 100
mes "dwFlags=" + st->dwFlags