Win32 API 日本語リファレンス
ホームGraphics.Direct3D12 › D3D12_FEATURE_DATA_D3D12_OPTIONS13

D3D12_FEATURE_DATA_D3D12_OPTIONS13

構造体
サイズx64: 24 バイト / x86: 24 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
UnrestrictedBufferTextureCopyPitchSupportedBOOL4+0+0制限のないバッファ-テクスチャ間コピーピッチに対応するか。
UnrestrictedVertexElementAlignmentSupportedBOOL4+4+4制限のない頂点要素アライメントに対応するか。
InvertedViewportHeightFlipsYSupportedBOOL4+8+8ビューポート高さ反転によるY反転に対応するか。
InvertedViewportDepthFlipsZSupportedBOOL4+12+12ビューポート深度反転によるZ反転に対応するか。
TextureCopyBetweenDimensionsSupportedBOOL4+16+16次元をまたぐテクスチャコピーに対応するか。
AlphaBlendFactorSupportedBOOL4+20+20アルファブレンド係数に対応するか。

各言語での定義

#include <windows.h>

// D3D12_FEATURE_DATA_D3D12_OPTIONS13  (x64 24 / x86 24 バイト)
typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS13 {
    BOOL UnrestrictedBufferTextureCopyPitchSupported;
    BOOL UnrestrictedVertexElementAlignmentSupported;
    BOOL InvertedViewportHeightFlipsYSupported;
    BOOL InvertedViewportDepthFlipsZSupported;
    BOOL TextureCopyBetweenDimensionsSupported;
    BOOL AlphaBlendFactorSupported;
} D3D12_FEATURE_DATA_D3D12_OPTIONS13;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_D3D12_OPTIONS13
{
    [MarshalAs(UnmanagedType.Bool)] public bool UnrestrictedBufferTextureCopyPitchSupported;
    [MarshalAs(UnmanagedType.Bool)] public bool UnrestrictedVertexElementAlignmentSupported;
    [MarshalAs(UnmanagedType.Bool)] public bool InvertedViewportHeightFlipsYSupported;
    [MarshalAs(UnmanagedType.Bool)] public bool InvertedViewportDepthFlipsZSupported;
    [MarshalAs(UnmanagedType.Bool)] public bool TextureCopyBetweenDimensionsSupported;
    [MarshalAs(UnmanagedType.Bool)] public bool AlphaBlendFactorSupported;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_D3D12_OPTIONS13
    <MarshalAs(UnmanagedType.Bool)> Public UnrestrictedBufferTextureCopyPitchSupported As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public UnrestrictedVertexElementAlignmentSupported As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public InvertedViewportHeightFlipsYSupported As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public InvertedViewportDepthFlipsZSupported As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public TextureCopyBetweenDimensionsSupported As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public AlphaBlendFactorSupported As Boolean
End Structure
import ctypes
from ctypes import wintypes

class D3D12_FEATURE_DATA_D3D12_OPTIONS13(ctypes.Structure):
    _fields_ = [
        ("UnrestrictedBufferTextureCopyPitchSupported", wintypes.BOOL),
        ("UnrestrictedVertexElementAlignmentSupported", wintypes.BOOL),
        ("InvertedViewportHeightFlipsYSupported", wintypes.BOOL),
        ("InvertedViewportDepthFlipsZSupported", wintypes.BOOL),
        ("TextureCopyBetweenDimensionsSupported", wintypes.BOOL),
        ("AlphaBlendFactorSupported", wintypes.BOOL),
    ]
#[repr(C)]
pub struct D3D12_FEATURE_DATA_D3D12_OPTIONS13 {
    pub UnrestrictedBufferTextureCopyPitchSupported: i32,
    pub UnrestrictedVertexElementAlignmentSupported: i32,
    pub InvertedViewportHeightFlipsYSupported: i32,
    pub InvertedViewportDepthFlipsZSupported: i32,
    pub TextureCopyBetweenDimensionsSupported: i32,
    pub AlphaBlendFactorSupported: i32,
}
import "golang.org/x/sys/windows"

type D3D12_FEATURE_DATA_D3D12_OPTIONS13 struct {
	UnrestrictedBufferTextureCopyPitchSupported int32
	UnrestrictedVertexElementAlignmentSupported int32
	InvertedViewportHeightFlipsYSupported int32
	InvertedViewportDepthFlipsZSupported int32
	TextureCopyBetweenDimensionsSupported int32
	AlphaBlendFactorSupported int32
}
type
  D3D12_FEATURE_DATA_D3D12_OPTIONS13 = record
    UnrestrictedBufferTextureCopyPitchSupported: BOOL;
    UnrestrictedVertexElementAlignmentSupported: BOOL;
    InvertedViewportHeightFlipsYSupported: BOOL;
    InvertedViewportDepthFlipsZSupported: BOOL;
    TextureCopyBetweenDimensionsSupported: BOOL;
    AlphaBlendFactorSupported: BOOL;
  end;
const D3D12_FEATURE_DATA_D3D12_OPTIONS13 = extern struct {
    UnrestrictedBufferTextureCopyPitchSupported: i32,
    UnrestrictedVertexElementAlignmentSupported: i32,
    InvertedViewportHeightFlipsYSupported: i32,
    InvertedViewportDepthFlipsZSupported: i32,
    TextureCopyBetweenDimensionsSupported: i32,
    AlphaBlendFactorSupported: i32,
};
type
  D3D12_FEATURE_DATA_D3D12_OPTIONS13 {.bycopy.} = object
    UnrestrictedBufferTextureCopyPitchSupported: int32
    UnrestrictedVertexElementAlignmentSupported: int32
    InvertedViewportHeightFlipsYSupported: int32
    InvertedViewportDepthFlipsZSupported: int32
    TextureCopyBetweenDimensionsSupported: int32
    AlphaBlendFactorSupported: int32
struct D3D12_FEATURE_DATA_D3D12_OPTIONS13
{
    int UnrestrictedBufferTextureCopyPitchSupported;
    int UnrestrictedVertexElementAlignmentSupported;
    int InvertedViewportHeightFlipsYSupported;
    int InvertedViewportDepthFlipsZSupported;
    int TextureCopyBetweenDimensionsSupported;
    int AlphaBlendFactorSupported;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_D3D12_OPTIONS13 サイズ: 24 バイト(x64)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; UnrestrictedBufferTextureCopyPitchSupported : BOOL (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; UnrestrictedVertexElementAlignmentSupported : BOOL (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; InvertedViewportHeightFlipsYSupported : BOOL (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; InvertedViewportDepthFlipsZSupported : BOOL (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; TextureCopyBetweenDimensionsSupported : BOOL (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; AlphaBlendFactorSupported : BOOL (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D12_FEATURE_DATA_D3D12_OPTIONS13
    #field bool UnrestrictedBufferTextureCopyPitchSupported
    #field bool UnrestrictedVertexElementAlignmentSupported
    #field bool InvertedViewportHeightFlipsYSupported
    #field bool InvertedViewportDepthFlipsZSupported
    #field bool TextureCopyBetweenDimensionsSupported
    #field bool AlphaBlendFactorSupported
#endstruct

stdim st, D3D12_FEATURE_DATA_D3D12_OPTIONS13        ; NSTRUCT 変数を確保
st->UnrestrictedBufferTextureCopyPitchSupported = 100
mes "UnrestrictedBufferTextureCopyPitchSupported=" + st->UnrestrictedBufferTextureCopyPitchSupported