//! NOTE: this file is autogenerated, DO NOT MODIFY
//--------------------------------------------------------------------------------
// Section: Constants (317)
//--------------------------------------------------------------------------------
pub const D3DRTYPECOUNT = @as(u32, 8);
pub const D3DCS_LEFT = @as(i32, 1);
pub const D3DCS_RIGHT = @as(i32, 2);
pub const D3DCS_TOP = @as(i32, 4);
pub const D3DCS_BOTTOM = @as(i32, 8);
pub const D3DCS_FRONT = @as(i32, 16);
pub const D3DCS_BACK = @as(i32, 32);
pub const D3DCS_PLANE0 = @as(i32, 64);
pub const D3DCS_PLANE1 = @as(i32, 128);
pub const D3DCS_PLANE2 = @as(i32, 256);
pub const D3DCS_PLANE3 = @as(i32, 512);
pub const D3DCS_PLANE4 = @as(i32, 1024);
pub const D3DCS_PLANE5 = @as(i32, 2048);
pub const D3D_MAX_SIMULTANEOUS_RENDERTARGETS = @as(u32, 4);
pub const D3DWRAP_W = @as(i32, 4);
pub const D3DDMAPSAMPLER = @as(u32, 256);
pub const D3DVERTEXTEXTURESAMPLER0 = @as(u32, 257);
pub const D3DVERTEXTEXTURESAMPLER1 = @as(u32, 258);
pub const D3DVERTEXTEXTURESAMPLER2 = @as(u32, 259);
pub const D3DVERTEXTEXTURESAMPLER3 = @as(u32, 260);
pub const D3DTSS_TCI_SPHEREMAP = @as(u32, 262144);
pub const D3DTA_TEMP = @as(u32, 5);
pub const D3DTA_CONSTANT = @as(u32, 6);
pub const D3DFVF_XYZW = @as(u32, 16386);
pub const D3DFVF_PSIZE = @as(u32, 32);
pub const D3DFVF_LASTBETA_UBYTE4 = @as(u32, 4096);
pub const D3DFVF_LASTBETA_D3DCOLOR = @as(u32, 32768);
pub const MAXD3DDECLUSAGEINDEX = @as(u32, 15);
pub const MAXD3DDECLLENGTH = @as(u32, 64);
pub const D3DSTREAMSOURCE_INDEXEDDATA = @as(u32, 1073741824);
pub const D3DSTREAMSOURCE_INSTANCEDATA = @as(u32, 2147483648);
pub const D3DSI_OPCODE_MASK = @as(u32, 65535);
pub const D3DSI_INSTLENGTH_MASK = @as(u32, 251658240);
pub const D3DSI_INSTLENGTH_SHIFT = @as(u32, 24);
pub const D3DSI_COISSUE = @as(u32, 1073741824);
pub const D3DSP_OPCODESPECIFICCONTROL_MASK = @as(u32, 16711680);
pub const D3DSP_OPCODESPECIFICCONTROL_SHIFT = @as(u32, 16);
pub const D3DSHADER_COMPARISON_SHIFT = @as(u32, 16);
pub const D3DSP_DCL_USAGE_SHIFT = @as(u32, 0);
pub const D3DSP_DCL_USAGE_MASK = @as(u32, 15);
pub const D3DSP_DCL_USAGEINDEX_SHIFT = @as(u32, 16);
pub const D3DSP_DCL_USAGEINDEX_MASK = @as(u32, 983040);
pub const D3DSP_TEXTURETYPE_SHIFT = @as(u32, 27);
pub const D3DSP_TEXTURETYPE_MASK = @as(u32, 2013265920);
pub const D3DSP_REGNUM_MASK = @as(u32, 2047);
pub const D3DSP_WRITEMASK_0 = @as(u32, 65536);
pub const D3DSP_WRITEMASK_1 = @as(u32, 131072);
pub const D3DSP_WRITEMASK_2 = @as(u32, 262144);
pub const D3DSP_WRITEMASK_3 = @as(u32, 524288);
pub const D3DSP_WRITEMASK_ALL = @as(u32, 983040);
pub const D3DSP_DSTMOD_SHIFT = @as(u32, 20);
pub const D3DSP_DSTMOD_MASK = @as(u32, 15728640);
pub const D3DSP_DSTSHIFT_SHIFT = @as(u32, 24);
pub const D3DSP_DSTSHIFT_MASK = @as(u32, 251658240);
pub const D3DSP_REGTYPE_SHIFT = @as(u32, 28);
pub const D3DSP_REGTYPE_SHIFT2 = @as(u32, 8);
pub const D3DSP_REGTYPE_MASK = @as(u32, 1879048192);
pub const D3DSP_REGTYPE_MASK2 = @as(u32, 6144);
pub const D3DVS_ADDRESSMODE_SHIFT = @as(u32, 13);
pub const D3DSHADER_ADDRESSMODE_SHIFT = @as(u32, 13);
pub const D3DVS_SWIZZLE_SHIFT = @as(u32, 16);
pub const D3DVS_SWIZZLE_MASK = @as(u32, 16711680);
pub const D3DSP_SWIZZLE_SHIFT = @as(u32, 16);
pub const D3DSP_SWIZZLE_MASK = @as(u32, 16711680);
pub const D3DSP_SRCMOD_SHIFT = @as(u32, 24);
pub const D3DSP_SRCMOD_MASK = @as(u32, 251658240);
pub const D3DSP_MIN_PRECISION_SHIFT = @as(u32, 14);
pub const D3DSP_MIN_PRECISION_MASK = @as(u32, 49152);
pub const D3DSI_COMMENTSIZE_SHIFT = @as(u32, 16);
pub const D3DSI_COMMENTSIZE_MASK = @as(u32, 2147418112);
pub const D3DPRESENT_RATE_DEFAULT = @as(u32, 0);
pub const D3DPRESENTFLAG_LOCKABLE_BACKBUFFER = @as(u32, 1);
pub const D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL = @as(u32, 2);
pub const D3DPRESENTFLAG_DEVICECLIP = @as(u32, 4);
pub const D3DPRESENTFLAG_VIDEO = @as(u32, 16);
pub const D3DPRESENTFLAG_NOAUTOROTATE = @as(u32, 32);
pub const D3DPRESENTFLAG_UNPRUNEDMODE = @as(u32, 64);
pub const D3DPRESENTFLAG_OVERLAY_LIMITEDRGB = @as(u32, 128);
pub const D3DPRESENTFLAG_OVERLAY_YCbCr_BT709 = @as(u32, 256);
pub const D3DPRESENTFLAG_OVERLAY_YCbCr_xvYCC = @as(u32, 512);
pub const D3DPRESENTFLAG_RESTRICTED_CONTENT = @as(u32, 1024);
pub const D3DPRESENTFLAG_RESTRICT_SHARED_RESOURCE_DRIVER = @as(u32, 2048);
pub const D3DUSAGE_RENDERTARGET = @as(i32, 1);
pub const D3DUSAGE_DEPTHSTENCIL = @as(i32, 2);
pub const D3DUSAGE_DYNAMIC = @as(i32, 512);
pub const D3DUSAGE_NONSECURE = @as(i32, 8388608);
pub const D3DUSAGE_AUTOGENMIPMAP = @as(i32, 1024);
pub const D3DUSAGE_DMAP = @as(i32, 16384);
pub const D3DUSAGE_QUERY_LEGACYBUMPMAP = @as(i32, 32768);
pub const D3DUSAGE_QUERY_SRGBREAD = @as(i32, 65536);
pub const D3DUSAGE_QUERY_FILTER = @as(i32, 131072);
pub const D3DUSAGE_QUERY_SRGBWRITE = @as(i32, 262144);
pub const D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING = @as(i32, 524288);
pub const D3DUSAGE_QUERY_VERTEXTEXTURE = @as(i32, 1048576);
pub const D3DUSAGE_QUERY_WRAPANDMIP = @as(i32, 2097152);
pub const D3DUSAGE_WRITEONLY = @as(i32, 8);
pub const D3DUSAGE_SOFTWAREPROCESSING = @as(i32, 16);
pub const D3DUSAGE_DONOTCLIP = @as(i32, 32);
pub const D3DUSAGE_POINTS = @as(i32, 64);
pub const D3DUSAGE_RTPATCHES = @as(i32, 128);
pub const D3DUSAGE_NPATCHES = @as(i32, 256);
pub const D3DUSAGE_TEXTAPI = @as(i32, 268435456);
pub const D3DUSAGE_RESTRICTED_CONTENT = @as(i32, 2048);
pub const D3DUSAGE_RESTRICT_SHARED_RESOURCE = @as(i32, 8192);
pub const D3DUSAGE_RESTRICT_SHARED_RESOURCE_DRIVER = @as(i32, 4096);
pub const D3DLOCK_READONLY = @as(i32, 16);
pub const D3DLOCK_DISCARD = @as(i32, 8192);
pub const D3DLOCK_NOOVERWRITE = @as(i32, 4096);
pub const D3DLOCK_NOSYSLOCK = @as(i32, 2048);
pub const D3DLOCK_DONOTWAIT = @as(i32, 16384);
pub const D3DLOCK_NO_DIRTY_UPDATE = @as(i32, 32768);
pub const MAX_DEVICE_IDENTIFIER_STRING = @as(u32, 512);
pub const D3DISSUE_END = @as(u32, 1);
pub const D3DISSUE_BEGIN = @as(u32, 2);
pub const D3DGETDATA_FLUSH = @as(u32, 1);
pub const D3DCOMPOSERECTS_MAXNUMRECTS = @as(u32, 65535);
pub const D3DCONVOLUTIONMONO_MAXWIDTH = @as(u32, 7);
pub const D3DCONVOLUTIONMONO_MAXHEIGHT = @as(u32, 7);
pub const D3DFMT_A1_SURFACE_MAXWIDTH = @as(u32, 8192);
pub const D3DFMT_A1_SURFACE_MAXHEIGHT = @as(u32, 2048);
pub const D3D9_RESOURCE_PRIORITY_MINIMUM = @as(u32, 671088640);
pub const D3D9_RESOURCE_PRIORITY_LOW = @as(u32, 1342177280);
pub const D3D9_RESOURCE_PRIORITY_NORMAL = @as(u32, 2013265920);
pub const D3D9_RESOURCE_PRIORITY_HIGH = @as(u32, 2684354560);
pub const D3D9_RESOURCE_PRIORITY_MAXIMUM = @as(u32, 3355443200);
pub const D3D_OMAC_SIZE = @as(u32, 16);
pub const D3DAUTHENTICATEDQUERY_PROTECTION = Guid.initString("a84eb584-c495-48aa-b94d-8bd2d6fbce05");
pub const D3DAUTHENTICATEDQUERY_CHANNELTYPE = Guid.initString("bc1b18a5-b1fb-42ab-bd94-b5828b4bf7be");
pub const D3DAUTHENTICATEDQUERY_DEVICEHANDLE = Guid.initString("ec1c539d-8cff-4e2a-bcc4-f5692f99f480");
pub const D3DAUTHENTICATEDQUERY_CRYPTOSESSION = Guid.initString("2634499e-d018-4d74-ac17-7f724059528d");
pub const D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESSCOUNT = Guid.initString("0db207b3-9450-46a6-82de-1b96d44f9cf2");
pub const D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESS = Guid.initString("649bbadb-f0f4-4639-a15b-24393fc3abac");
pub const D3DAUTHENTICATEDQUERY_UNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT = Guid.initString("012f0bd6-e662-4474-befd-aa53e5143c6d");
pub const D3DAUTHENTICATEDQUERY_OUTPUTIDCOUNT = Guid.initString("2c042b5e-8c07-46d5-aabe-8f75cbad4c31");
pub const D3DAUTHENTICATEDQUERY_OUTPUTID = Guid.initString("839ddca3-9b4e-41e4-b053-892bd2a11ee7");
pub const D3DAUTHENTICATEDQUERY_ACCESSIBILITYATTRIBUTES = Guid.initString("6214d9d2-432c-4abb-9fce-216eea269e3b");
pub const D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUIDCOUNT = Guid.initString("b30f7066-203c-4b07-93fc-ceaafd61241e");
pub const D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUID = Guid.initString("f83a5958-e986-4bda-beb0-411f6a7a01b7");
pub const D3DAUTHENTICATEDQUERY_CURRENTENCRYPTIONWHENACCESSIBLE = Guid.initString("ec1791c7-dad3-4f15-9ec3-faa93d60d4f0");
pub const D3DAUTHENTICATEDCONFIGURE_INITIALIZE = Guid.initString("06114bdb-3523-470a-8dca-fbc2845154f0");
pub const D3DAUTHENTICATEDCONFIGURE_PROTECTION = Guid.initString("50455658-3f47-4362-bf99-bfdfcde9ed29");
pub const D3DAUTHENTICATEDCONFIGURE_CRYPTOSESSION = Guid.initString("6346cc54-2cfc-4ad4-8224-d15837de7700");
pub const D3DAUTHENTICATEDCONFIGURE_SHAREDRESOURCE = Guid.initString("0772d047-1b40-48e8-9ca6-b5f510de9f01");
pub const D3DAUTHENTICATEDCONFIGURE_ENCRYPTIONWHENACCESSIBLE = Guid.initString("41fff286-6ae0-4d43-9d55-a46e9efd158a");
pub const D3DVS20CAPS_PREDICATION = @as(u32, 1);
pub const D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH = @as(u32, 24);
pub const D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH = @as(u32, 0);
pub const D3DVS20_MAX_NUMTEMPS = @as(u32, 32);
pub const D3DVS20_MIN_NUMTEMPS = @as(u32, 12);
pub const D3DVS20_MAX_STATICFLOWCONTROLDEPTH = @as(u32, 4);
pub const D3DVS20_MIN_STATICFLOWCONTROLDEPTH = @as(u32, 1);
pub const D3DPS20CAPS_ARBITRARYSWIZZLE = @as(u32, 1);
pub const D3DPS20CAPS_GRADIENTINSTRUCTIONS = @as(u32, 2);
pub const D3DPS20CAPS_PREDICATION = @as(u32, 4);
pub const D3DPS20CAPS_NODEPENDENTREADLIMIT = @as(u32, 8);
pub const D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT = @as(u32, 16);
pub const D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH = @as(u32, 24);
pub const D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH = @as(u32, 0);
pub const D3DPS20_MAX_NUMTEMPS = @as(u32, 32);
pub const D3DPS20_MIN_NUMTEMPS = @as(u32, 12);
pub const D3DPS20_MAX_STATICFLOWCONTROLDEPTH = @as(u32, 4);
pub const D3DPS20_MIN_STATICFLOWCONTROLDEPTH = @as(u32, 0);
pub const D3DPS20_MAX_NUMINSTRUCTIONSLOTS = @as(u32, 512);
pub const D3DPS20_MIN_NUMINSTRUCTIONSLOTS = @as(u32, 96);
pub const D3DMIN30SHADERINSTRUCTIONS = @as(u32, 512);
pub const D3DMAX30SHADERINSTRUCTIONS = @as(u32, 32768);
pub const D3DOVERLAYCAPS_FULLRANGERGB = @as(u32, 1);
pub const D3DOVERLAYCAPS_LIMITEDRANGERGB = @as(u32, 2);
pub const D3DOVERLAYCAPS_YCbCr_BT601 = @as(u32, 4);
pub const D3DOVERLAYCAPS_YCbCr_BT709 = @as(u32, 8);
pub const D3DOVERLAYCAPS_YCbCr_BT601_xvYCC = @as(u32, 16);
pub const D3DOVERLAYCAPS_YCbCr_BT709_xvYCC = @as(u32, 32);
pub const D3DOVERLAYCAPS_STRETCHX = @as(u32, 64);
pub const D3DOVERLAYCAPS_STRETCHY = @as(u32, 128);
pub const D3DCPCAPS_SOFTWARE = @as(u32, 1);
pub const D3DCPCAPS_HARDWARE = @as(u32, 2);
pub const D3DCPCAPS_PROTECTIONALWAYSON = @as(u32, 4);
pub const D3DCPCAPS_PARTIALDECRYPTION = @as(u32, 8);
pub const D3DCPCAPS_CONTENTKEY = @as(u32, 16);
pub const D3DCPCAPS_FRESHENSESSIONKEY = @as(u32, 32);
pub const D3DCPCAPS_ENCRYPTEDREADBACK = @as(u32, 64);
pub const D3DCPCAPS_ENCRYPTEDREADBACKKEY = @as(u32, 128);
pub const D3DCPCAPS_SEQUENTIAL_CTR_IV = @as(u32, 256);
pub const D3DCPCAPS_ENCRYPTSLICEDATAONLY = @as(u32, 512);
pub const D3DCRYPTOTYPE_AES128_CTR = Guid.initString("9b6bd711-4f74-41c9-9e7b-0be2d7d93b4f");
pub const D3DCRYPTOTYPE_PROPRIETARY = Guid.initString("ab4e9afd-1d1c-46e6-a72f-0869917b0de8");
pub const D3DKEYEXCHANGE_RSAES_OAEP = Guid.initString("c1949895-d72a-4a1d-8e5d-ed857d171520");
pub const D3DKEYEXCHANGE_DXVA = Guid.initString("43d3775c-38e5-4924-8d86-d3fccf153e9b");
pub const D3DCAPS_OVERLAY = @as(i32, 2048);
pub const D3DCAPS_READ_SCANLINE = @as(i32, 131072);
pub const D3DCAPS2_FULLSCREENGAMMA = @as(i32, 131072);
pub const D3DCAPS2_CANCALIBRATEGAMMA = @as(i32, 1048576);
pub const D3DCAPS2_RESERVED = @as(i32, 33554432);
pub const D3DCAPS2_CANMANAGERESOURCE = @as(i32, 268435456);
pub const D3DCAPS2_DYNAMICTEXTURES = @as(i32, 536870912);
pub const D3DCAPS2_CANAUTOGENMIPMAP = @as(i32, 1073741824);
pub const D3DCAPS2_CANSHARERESOURCE = @as(i32, -2147483648);
pub const D3DCAPS3_RESERVED = @as(i32, -2147483617);
pub const D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD = @as(i32, 32);
pub const D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION = @as(i32, 128);
pub const D3DCAPS3_COPY_TO_VIDMEM = @as(i32, 256);
pub const D3DCAPS3_COPY_TO_SYSTEMMEM = @as(i32, 512);
pub const D3DCAPS3_DXVAHD = @as(i32, 1024);
pub const D3DCAPS3_DXVAHD_LIMITED = @as(i32, 2048);
pub const D3DPRESENT_INTERVAL_DEFAULT = @as(i32, 0);
pub const D3DPRESENT_INTERVAL_ONE = @as(i32, 1);
pub const D3DPRESENT_INTERVAL_TWO = @as(i32, 2);
pub const D3DPRESENT_INTERVAL_THREE = @as(i32, 4);
pub const D3DPRESENT_INTERVAL_FOUR = @as(i32, 8);
pub const D3DPRESENT_INTERVAL_IMMEDIATE = @as(i32, -2147483648);
pub const D3DCURSORCAPS_COLOR = @as(i32, 1);
pub const D3DCURSORCAPS_LOWRES = @as(i32, 2);
pub const D3DDEVCAPS_PUREDEVICE = @as(i32, 1048576);
pub const D3DDEVCAPS_QUINTICRTPATCHES = @as(i32, 2097152);
pub const D3DDEVCAPS_RTPATCHES = @as(i32, 4194304);
pub const D3DDEVCAPS_RTPATCHHANDLEZERO = @as(i32, 8388608);
pub const D3DDEVCAPS_NPATCHES = @as(i32, 16777216);
pub const D3DPMISCCAPS_COLORWRITEENABLE = @as(i32, 128);
pub const D3DPMISCCAPS_CLIPPLANESCALEDPOINTS = @as(i32, 256);
pub const D3DPMISCCAPS_CLIPTLVERTS = @as(i32, 512);
pub const D3DPMISCCAPS_TSSARGTEMP = @as(i32, 1024);
pub const D3DPMISCCAPS_BLENDOP = @as(i32, 2048);
pub const D3DPMISCCAPS_NULLREFERENCE = @as(i32, 4096);
pub const D3DPMISCCAPS_INDEPENDENTWRITEMASKS = @as(i32, 16384);
pub const D3DPMISCCAPS_PERSTAGECONSTANT = @as(i32, 32768);
pub const D3DPMISCCAPS_FOGANDSPECULARALPHA = @as(i32, 65536);
pub const D3DPMISCCAPS_SEPARATEALPHABLEND = @as(i32, 131072);
pub const D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS = @as(i32, 262144);
pub const D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING = @as(i32, 524288);
pub const D3DPMISCCAPS_FOGVERTEXCLAMPED = @as(i32, 1048576);
pub const D3DPMISCCAPS_POSTBLENDSRGBCONVERT = @as(i32, 2097152);
pub const D3DLINECAPS_TEXTURE = @as(i32, 1);
pub const D3DLINECAPS_ZTEST = @as(i32, 2);
pub const D3DLINECAPS_BLEND = @as(i32, 4);
pub const D3DLINECAPS_ALPHACMP = @as(i32, 8);
pub const D3DLINECAPS_FOG = @as(i32, 16);
pub const D3DLINECAPS_ANTIALIAS = @as(i32, 32);
pub const D3DPRASTERCAPS_COLORPERSPECTIVE = @as(i32, 4194304);
pub const D3DPRASTERCAPS_SCISSORTEST = @as(i32, 16777216);
pub const D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS = @as(i32, 33554432);
pub const D3DPRASTERCAPS_DEPTHBIAS = @as(i32, 67108864);
pub const D3DPRASTERCAPS_MULTISAMPLE_TOGGLE = @as(i32, 134217728);
pub const D3DPBLENDCAPS_BLENDFACTOR = @as(i32, 8192);
pub const D3DPBLENDCAPS_SRCCOLOR2 = @as(i32, 16384);
pub const D3DPBLENDCAPS_INVSRCCOLOR2 = @as(i32, 32768);
pub const D3DPTEXTURECAPS_VOLUMEMAP = @as(i32, 8192);
pub const D3DPTEXTURECAPS_MIPMAP = @as(i32, 16384);
pub const D3DPTEXTURECAPS_MIPVOLUMEMAP = @as(i32, 32768);
pub const D3DPTEXTURECAPS_MIPCUBEMAP = @as(i32, 65536);
pub const D3DPTEXTURECAPS_CUBEMAP_POW2 = @as(i32, 131072);
pub const D3DPTEXTURECAPS_VOLUMEMAP_POW2 = @as(i32, 262144);
pub const D3DPTEXTURECAPS_NOPROJECTEDBUMPENV = @as(i32, 2097152);
pub const D3DPTFILTERCAPS_MINFPYRAMIDALQUAD = @as(i32, 2048);
pub const D3DPTFILTERCAPS_MINFGAUSSIANQUAD = @as(i32, 4096);
pub const D3DPTFILTERCAPS_CONVOLUTIONMONO = @as(i32, 262144);
pub const D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD = @as(i32, 134217728);
pub const D3DPTFILTERCAPS_MAGFGAUSSIANQUAD = @as(i32, 268435456);
pub const D3DPTADDRESSCAPS_MIRRORONCE = @as(i32, 32);
pub const D3DSTENCILCAPS_TWOSIDED = @as(i32, 256);
pub const D3DTEXOPCAPS_MULTIPLYADD = @as(i32, 16777216);
pub const D3DTEXOPCAPS_LERP = @as(i32, 33554432);
pub const D3DFVFCAPS_PSIZE = @as(i32, 1048576);
pub const D3DVTXPCAPS_TWEENING = @as(i32, 64);
pub const D3DVTXPCAPS_TEXGEN_SPHEREMAP = @as(i32, 256);
pub const D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER = @as(i32, 512);
pub const D3DDEVCAPS2_STREAMOFFSET = @as(i32, 1);
pub const D3DDEVCAPS2_DMAPNPATCH = @as(i32, 2);
pub const D3DDEVCAPS2_ADAPTIVETESSRTPATCH = @as(i32, 4);
pub const D3DDEVCAPS2_ADAPTIVETESSNPATCH = @as(i32, 8);
pub const D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES = @as(i32, 16);
pub const D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH = @as(i32, 32);
pub const D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET = @as(i32, 64);
pub const D3DDTCAPS_UBYTE4 = @as(i32, 1);
pub const D3DDTCAPS_UBYTE4N = @as(i32, 2);
pub const D3DDTCAPS_SHORT2N = @as(i32, 4);
pub const D3DDTCAPS_SHORT4N = @as(i32, 8);
pub const D3DDTCAPS_USHORT2N = @as(i32, 16);
pub const D3DDTCAPS_USHORT4N = @as(i32, 32);
pub const D3DDTCAPS_UDEC3 = @as(i32, 64);
pub const D3DDTCAPS_DEC3N = @as(i32, 128);
pub const D3DDTCAPS_FLOAT16_2 = @as(i32, 256);
pub const D3DDTCAPS_FLOAT16_4 = @as(i32, 512);
pub const D3DSPD_IUNKNOWN = @as(i32, 1);
pub const D3DCREATE_FPU_PRESERVE = @as(i32, 2);
pub const D3DCREATE_MULTITHREADED = @as(i32, 4);
pub const D3DCREATE_PUREDEVICE = @as(i32, 16);
pub const D3DCREATE_SOFTWARE_VERTEXPROCESSING = @as(i32, 32);
pub const D3DCREATE_HARDWARE_VERTEXPROCESSING = @as(i32, 64);
pub const D3DCREATE_MIXED_VERTEXPROCESSING = @as(i32, 128);
pub const D3DCREATE_DISABLE_DRIVER_MANAGEMENT = @as(i32, 256);
pub const D3DCREATE_ADAPTERGROUP_DEVICE = @as(i32, 512);
pub const D3DADAPTER_DEFAULT = @as(u32, 0);
pub const D3DENUM_NO_DRIVERVERSION = @as(i32, 4);
pub const D3DPRESENT_BACK_BUFFERS_MAX = @as(i32, 3);
pub const D3DSGR_NO_CALIBRATION = @as(i32, 0);
pub const D3DSGR_CALIBRATE = @as(i32, 1);
pub const D3DCURSOR_IMMEDIATE_UPDATE = @as(i32, 1);
pub const D3DPRESENT_DONOTWAIT = @as(i32, 1);
pub const D3DPRESENT_LINEAR_CONTENT = @as(i32, 2);
pub const _FACD3D = @as(u32, 2166);
pub const D3D_SDK_VERSION = @as(u32, 32);
pub const D3D9b_SDK_VERSION = @as(u32, 31);
pub const D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX = @as(i32, 1024);
pub const D3DCREATE_NOWINDOWCHANGES = @as(i32, 2048);
pub const D3DCREATE_DISABLE_PSGP_THREADING = @as(i32, 8192);
pub const D3DCREATE_ENABLE_PRESENTSTATS = @as(i32, 16384);
pub const D3DCREATE_DISABLE_PRINTSCREEN = @as(i32, 32768);
pub const D3DCREATE_SCREENSAVER = @as(i32, 268435456);
pub const D3DENUM_WHQL_LEVEL = @as(i32, 2);
pub const D3DPRESENT_BACK_BUFFERS_MAX_EX = @as(i32, 30);
pub const D3DPRESENT_DONOTFLIP = @as(i32, 4);
pub const D3DPRESENT_FLIPRESTART = @as(i32, 8);
pub const D3DPRESENT_VIDEO_RESTRICT_TO_MONITOR = @as(i32, 16);
pub const D3DPRESENT_UPDATEOVERLAYONLY = @as(i32, 32);
pub const D3DPRESENT_HIDEOVERLAY = @as(i32, 64);
pub const D3DPRESENT_UPDATECOLORKEY = @as(i32, 128);
pub const D3DPRESENT_FORCEIMMEDIATE = @as(i32, 256);

//--------------------------------------------------------------------------------
// Section: Types (151)
//--------------------------------------------------------------------------------
pub const D3DCOLORVALUE = extern struct {
    r: f32,
    g: f32,
    b: f32,
    a: f32,
};

pub const D3DRECT = extern struct {
    x1: i32,
    y1: i32,
    x2: i32,
    y2: i32,
};

pub const D3DVIEWPORT9 = extern struct {
    X: u32,
    Y: u32,
    Width: u32,
    Height: u32,
    MinZ: f32,
    MaxZ: f32,
};

pub const D3DCLIPSTATUS9 = extern struct {
    ClipUnion: u32,
    ClipIntersection: u32,
};

pub const D3DMATERIAL9 = extern struct {
    Diffuse: D3DCOLORVALUE,
    Ambient: D3DCOLORVALUE,
    Specular: D3DCOLORVALUE,
    Emissive: D3DCOLORVALUE,
    Power: f32,
};

pub const D3DLIGHTTYPE = enum(i32) {
    POINT = 1,
    SPOT = 2,
    DIRECTIONAL = 3,
    FORCE_DWORD = 2147483647,
};
pub const D3DLIGHT_POINT = D3DLIGHTTYPE.POINT;
pub const D3DLIGHT_SPOT = D3DLIGHTTYPE.SPOT;
pub const D3DLIGHT_DIRECTIONAL = D3DLIGHTTYPE.DIRECTIONAL;
pub const D3DLIGHT_FORCE_DWORD = D3DLIGHTTYPE.FORCE_DWORD;

pub const D3DLIGHT9 = extern struct {
    Type: D3DLIGHTTYPE,
    Diffuse: D3DCOLORVALUE,
    Specular: D3DCOLORVALUE,
    Ambient: D3DCOLORVALUE,
    Position: D3DVECTOR,
    Direction: D3DVECTOR,
    Range: f32,
    Falloff: f32,
    Attenuation0: f32,
    Attenuation1: f32,
    Attenuation2: f32,
    Theta: f32,
    Phi: f32,
};

pub const D3DSHADEMODE = enum(i32) {
    FLAT = 1,
    GOURAUD = 2,
    PHONG = 3,
    FORCE_DWORD = 2147483647,
};
pub const D3DSHADE_FLAT = D3DSHADEMODE.FLAT;
pub const D3DSHADE_GOURAUD = D3DSHADEMODE.GOURAUD;
pub const D3DSHADE_PHONG = D3DSHADEMODE.PHONG;
pub const D3DSHADE_FORCE_DWORD = D3DSHADEMODE.FORCE_DWORD;

pub const D3DFILLMODE = enum(i32) {
    POINT = 1,
    WIREFRAME = 2,
    SOLID = 3,
    FORCE_DWORD = 2147483647,
};
pub const D3DFILL_POINT = D3DFILLMODE.POINT;
pub const D3DFILL_WIREFRAME = D3DFILLMODE.WIREFRAME;
pub const D3DFILL_SOLID = D3DFILLMODE.SOLID;
pub const D3DFILL_FORCE_DWORD = D3DFILLMODE.FORCE_DWORD;

pub const D3DBLEND = enum(u32) {
    ZERO = 1,
    ONE = 2,
    SRCCOLOR = 3,
    INVSRCCOLOR = 4,
    SRCALPHA = 5,
    INVSRCALPHA = 6,
    DESTALPHA = 7,
    INVDESTALPHA = 8,
    DESTCOLOR = 9,
    INVDESTCOLOR = 10,
    SRCALPHASAT = 11,
    BOTHSRCALPHA = 12,
    BOTHINVSRCALPHA = 13,
    BLENDFACTOR = 14,
    INVBLENDFACTOR = 15,
    SRCCOLOR2 = 16,
    INVSRCCOLOR2 = 17,
    FORCE_DWORD = 2147483647,
};
pub const D3DBLEND_ZERO = D3DBLEND.ZERO;
pub const D3DBLEND_ONE = D3DBLEND.ONE;
pub const D3DBLEND_SRCCOLOR = D3DBLEND.SRCCOLOR;
pub const D3DBLEND_INVSRCCOLOR = D3DBLEND.INVSRCCOLOR;
pub const D3DBLEND_SRCALPHA = D3DBLEND.SRCALPHA;
pub const D3DBLEND_INVSRCALPHA = D3DBLEND.INVSRCALPHA;
pub const D3DBLEND_DESTALPHA = D3DBLEND.DESTALPHA;
pub const D3DBLEND_INVDESTALPHA = D3DBLEND.INVDESTALPHA;
pub const D3DBLEND_DESTCOLOR = D3DBLEND.DESTCOLOR;
pub const D3DBLEND_INVDESTCOLOR = D3DBLEND.INVDESTCOLOR;
pub const D3DBLEND_SRCALPHASAT = D3DBLEND.SRCALPHASAT;
pub const D3DBLEND_BOTHSRCALPHA = D3DBLEND.BOTHSRCALPHA;
pub const D3DBLEND_BOTHINVSRCALPHA = D3DBLEND.BOTHINVSRCALPHA;
pub const D3DBLEND_BLENDFACTOR = D3DBLEND.BLENDFACTOR;
pub const D3DBLEND_INVBLENDFACTOR = D3DBLEND.INVBLENDFACTOR;
pub const D3DBLEND_SRCCOLOR2 = D3DBLEND.SRCCOLOR2;
pub const D3DBLEND_INVSRCCOLOR2 = D3DBLEND.INVSRCCOLOR2;
pub const D3DBLEND_FORCE_DWORD = D3DBLEND.FORCE_DWORD;

pub const D3DBLENDOP = enum(u32) {
    ADD = 1,
    SUBTRACT = 2,
    REVSUBTRACT = 3,
    MIN = 4,
    MAX = 5,
    FORCE_DWORD = 2147483647,
};
pub const D3DBLENDOP_ADD = D3DBLENDOP.ADD;
pub const D3DBLENDOP_SUBTRACT = D3DBLENDOP.SUBTRACT;
pub const D3DBLENDOP_REVSUBTRACT = D3DBLENDOP.REVSUBTRACT;
pub const D3DBLENDOP_MIN = D3DBLENDOP.MIN;
pub const D3DBLENDOP_MAX = D3DBLENDOP.MAX;
pub const D3DBLENDOP_FORCE_DWORD = D3DBLENDOP.FORCE_DWORD;

pub const D3DTEXTUREADDRESS = enum(i32) {
    WRAP = 1,
    MIRROR = 2,
    CLAMP = 3,
    BORDER = 4,
    MIRRORONCE = 5,
    FORCE_DWORD = 2147483647,
};
pub const D3DTADDRESS_WRAP = D3DTEXTUREADDRESS.WRAP;
pub const D3DTADDRESS_MIRROR = D3DTEXTUREADDRESS.MIRROR;
pub const D3DTADDRESS_CLAMP = D3DTEXTUREADDRESS.CLAMP;
pub const D3DTADDRESS_BORDER = D3DTEXTUREADDRESS.BORDER;
pub const D3DTADDRESS_MIRRORONCE = D3DTEXTUREADDRESS.MIRRORONCE;
pub const D3DTADDRESS_FORCE_DWORD = D3DTEXTUREADDRESS.FORCE_DWORD;

pub const D3DCULL = enum(u32) {
    NONE = 1,
    CW = 2,
    CCW = 3,
    FORCE_DWORD = 2147483647,
};
pub const D3DCULL_NONE = D3DCULL.NONE;
pub const D3DCULL_CW = D3DCULL.CW;
pub const D3DCULL_CCW = D3DCULL.CCW;
pub const D3DCULL_FORCE_DWORD = D3DCULL.FORCE_DWORD;

pub const D3DCMPFUNC = enum(i32) {
    NEVER = 1,
    LESS = 2,
    EQUAL = 3,
    LESSEQUAL = 4,
    GREATER = 5,
    NOTEQUAL = 6,
    GREATEREQUAL = 7,
    ALWAYS = 8,
    FORCE_DWORD = 2147483647,
};
pub const D3DCMP_NEVER = D3DCMPFUNC.NEVER;
pub const D3DCMP_LESS = D3DCMPFUNC.LESS;
pub const D3DCMP_EQUAL = D3DCMPFUNC.EQUAL;
pub const D3DCMP_LESSEQUAL = D3DCMPFUNC.LESSEQUAL;
pub const D3DCMP_GREATER = D3DCMPFUNC.GREATER;
pub const D3DCMP_NOTEQUAL = D3DCMPFUNC.NOTEQUAL;
pub const D3DCMP_GREATEREQUAL = D3DCMPFUNC.GREATEREQUAL;
pub const D3DCMP_ALWAYS = D3DCMPFUNC.ALWAYS;
pub const D3DCMP_FORCE_DWORD = D3DCMPFUNC.FORCE_DWORD;

pub const D3DSTENCILOP = enum(u32) {
    KEEP = 1,
    ZERO = 2,
    REPLACE = 3,
    INCRSAT = 4,
    DECRSAT = 5,
    INVERT = 6,
    INCR = 7,
    DECR = 8,
    FORCE_DWORD = 2147483647,
};
pub const D3DSTENCILOP_KEEP = D3DSTENCILOP.KEEP;
pub const D3DSTENCILOP_ZERO = D3DSTENCILOP.ZERO;
pub const D3DSTENCILOP_REPLACE = D3DSTENCILOP.REPLACE;
pub const D3DSTENCILOP_INCRSAT = D3DSTENCILOP.INCRSAT;
pub const D3DSTENCILOP_DECRSAT = D3DSTENCILOP.DECRSAT;
pub const D3DSTENCILOP_INVERT = D3DSTENCILOP.INVERT;
pub const D3DSTENCILOP_INCR = D3DSTENCILOP.INCR;
pub const D3DSTENCILOP_DECR = D3DSTENCILOP.DECR;
pub const D3DSTENCILOP_FORCE_DWORD = D3DSTENCILOP.FORCE_DWORD;

pub const D3DFOGMODE = enum(i32) {
    NONE = 0,
    EXP = 1,
    EXP2 = 2,
    LINEAR = 3,
    FORCE_DWORD = 2147483647,
};
pub const D3DFOG_NONE = D3DFOGMODE.NONE;
pub const D3DFOG_EXP = D3DFOGMODE.EXP;
pub const D3DFOG_EXP2 = D3DFOGMODE.EXP2;
pub const D3DFOG_LINEAR = D3DFOGMODE.LINEAR;
pub const D3DFOG_FORCE_DWORD = D3DFOGMODE.FORCE_DWORD;

pub const D3DZBUFFERTYPE = enum(i32) {
    FALSE = 0,
    TRUE = 1,
    USEW = 2,
    FORCE_DWORD = 2147483647,
};
pub const D3DZB_FALSE = D3DZBUFFERTYPE.FALSE;
pub const D3DZB_TRUE = D3DZBUFFERTYPE.TRUE;
pub const D3DZB_USEW = D3DZBUFFERTYPE.USEW;
pub const D3DZB_FORCE_DWORD = D3DZBUFFERTYPE.FORCE_DWORD;

pub const D3DPRIMITIVETYPE = enum(i32) {
    POINTLIST = 1,
    LINELIST = 2,
    LINESTRIP = 3,
    TRIANGLELIST = 4,
    TRIANGLESTRIP = 5,
    TRIANGLEFAN = 6,
    FORCE_DWORD = 2147483647,
};
pub const D3DPT_POINTLIST = D3DPRIMITIVETYPE.POINTLIST;
pub const D3DPT_LINELIST = D3DPRIMITIVETYPE.LINELIST;
pub const D3DPT_LINESTRIP = D3DPRIMITIVETYPE.LINESTRIP;
pub const D3DPT_TRIANGLELIST = D3DPRIMITIVETYPE.TRIANGLELIST;
pub const D3DPT_TRIANGLESTRIP = D3DPRIMITIVETYPE.TRIANGLESTRIP;
pub const D3DPT_TRIANGLEFAN = D3DPRIMITIVETYPE.TRIANGLEFAN;
pub const D3DPT_FORCE_DWORD = D3DPRIMITIVETYPE.FORCE_DWORD;

pub const D3DTRANSFORMSTATETYPE = enum(i32) {
    VIEW = 2,
    PROJECTION = 3,
    TEXTURE0 = 16,
    TEXTURE1 = 17,
    TEXTURE2 = 18,
    TEXTURE3 = 19,
    TEXTURE4 = 20,
    TEXTURE5 = 21,
    TEXTURE6 = 22,
    TEXTURE7 = 23,
    FORCE_DWORD = 2147483647,
};
pub const D3DTS_VIEW = D3DTRANSFORMSTATETYPE.VIEW;
pub const D3DTS_PROJECTION = D3DTRANSFORMSTATETYPE.PROJECTION;
pub const D3DTS_TEXTURE0 = D3DTRANSFORMSTATETYPE.TEXTURE0;
pub const D3DTS_TEXTURE1 = D3DTRANSFORMSTATETYPE.TEXTURE1;
pub const D3DTS_TEXTURE2 = D3DTRANSFORMSTATETYPE.TEXTURE2;
pub const D3DTS_TEXTURE3 = D3DTRANSFORMSTATETYPE.TEXTURE3;
pub const D3DTS_TEXTURE4 = D3DTRANSFORMSTATETYPE.TEXTURE4;
pub const D3DTS_TEXTURE5 = D3DTRANSFORMSTATETYPE.TEXTURE5;
pub const D3DTS_TEXTURE6 = D3DTRANSFORMSTATETYPE.TEXTURE6;
pub const D3DTS_TEXTURE7 = D3DTRANSFORMSTATETYPE.TEXTURE7;
pub const D3DTS_FORCE_DWORD = D3DTRANSFORMSTATETYPE.FORCE_DWORD;

pub const D3DRENDERSTATETYPE = enum(i32) {
    ZENABLE = 7,
    FILLMODE = 8,
    SHADEMODE = 9,
    ZWRITEENABLE = 14,
    ALPHATESTENABLE = 15,
    LASTPIXEL = 16,
    SRCBLEND = 19,
    DESTBLEND = 20,
    CULLMODE = 22,
    ZFUNC = 23,
    ALPHAREF = 24,
    ALPHAFUNC = 25,
    DITHERENABLE = 26,
    ALPHABLENDENABLE = 27,
    FOGENABLE = 28,
    SPECULARENABLE = 29,
    FOGCOLOR = 34,
    FOGTABLEMODE = 35,
    FOGSTART = 36,
    FOGEND = 37,
    FOGDENSITY = 38,
    RANGEFOGENABLE = 48,
    STENCILENABLE = 52,
    STENCILFAIL = 53,
    STENCILZFAIL = 54,
    STENCILPASS = 55,
    STENCILFUNC = 56,
    STENCILREF = 57,
    STENCILMASK = 58,
    STENCILWRITEMASK = 59,
    TEXTUREFACTOR = 60,
    WRAP0 = 128,
    WRAP1 = 129,
    WRAP2 = 130,
    WRAP3 = 131,
    WRAP4 = 132,
    WRAP5 = 133,
    WRAP6 = 134,
    WRAP7 = 135,
    CLIPPING = 136,
    LIGHTING = 137,
    AMBIENT = 139,
    FOGVERTEXMODE = 140,
    COLORVERTEX = 141,
    LOCALVIEWER = 142,
    NORMALIZENORMALS = 143,
    DIFFUSEMATERIALSOURCE = 145,
    SPECULARMATERIALSOURCE = 146,
    AMBIENTMATERIALSOURCE = 147,
    EMISSIVEMATERIALSOURCE = 148,
    VERTEXBLEND = 151,
    CLIPPLANEENABLE = 152,
    POINTSIZE = 154,
    POINTSIZE_MIN = 155,
    POINTSPRITEENABLE = 156,
    POINTSCALEENABLE = 157,
    POINTSCALE_A = 158,
    POINTSCALE_B = 159,
    POINTSCALE_C = 160,
    MULTISAMPLEANTIALIAS = 161,
    MULTISAMPLEMASK = 162,
    PATCHEDGESTYLE = 163,
    DEBUGMONITORTOKEN = 165,
    POINTSIZE_MAX = 166,
    INDEXEDVERTEXBLENDENABLE = 167,
    COLORWRITEENABLE = 168,
    TWEENFACTOR = 170,
    BLENDOP = 171,
    POSITIONDEGREE = 172,
    NORMALDEGREE = 173,
    SCISSORTESTENABLE = 174,
    SLOPESCALEDEPTHBIAS = 175,
    ANTIALIASEDLINEENABLE = 176,
    MINTESSELLATIONLEVEL = 178,
    MAXTESSELLATIONLEVEL = 179,
    ADAPTIVETESS_X = 180,
    ADAPTIVETESS_Y = 181,
    ADAPTIVETESS_Z = 182,
    ADAPTIVETESS_W = 183,
    ENABLEADAPTIVETESSELLATION = 184,
    TWOSIDEDSTENCILMODE = 185,
    CCW_STENCILFAIL = 186,
    CCW_STENCILZFAIL = 187,
    CCW_STENCILPASS = 188,
    CCW_STENCILFUNC = 189,
    COLORWRITEENABLE1 = 190,
    COLORWRITEENABLE2 = 191,
    COLORWRITEENABLE3 = 192,
    BLENDFACTOR = 193,
    SRGBWRITEENABLE = 194,
    DEPTHBIAS = 195,
    WRAP8 = 198,
    WRAP9 = 199,
    WRAP10 = 200,
    WRAP11 = 201,
    WRAP12 = 202,
    WRAP13 = 203,
    WRAP14 = 204,
    WRAP15 = 205,
    SEPARATEALPHABLENDENABLE = 206,
    SRCBLENDALPHA = 207,
    DESTBLENDALPHA = 208,
    BLENDOPALPHA = 209,
    FORCE_DWORD = 2147483647,
};
pub const D3DRS_ZENABLE = D3DRENDERSTATETYPE.ZENABLE;
pub const D3DRS_FILLMODE = D3DRENDERSTATETYPE.FILLMODE;
pub const D3DRS_SHADEMODE = D3DRENDERSTATETYPE.SHADEMODE;
pub const D3DRS_ZWRITEENABLE = D3DRENDERSTATETYPE.ZWRITEENABLE;
pub const D3DRS_ALPHATESTENABLE = D3DRENDERSTATETYPE.ALPHATESTENABLE;
pub const D3DRS_LASTPIXEL = D3DRENDERSTATETYPE.LASTPIXEL;
pub const D3DRS_SRCBLEND = D3DRENDERSTATETYPE.SRCBLEND;
pub const D3DRS_DESTBLEND = D3DRENDERSTATETYPE.DESTBLEND;
pub const D3DRS_CULLMODE = D3DRENDERSTATETYPE.CULLMODE;
pub const D3DRS_ZFUNC = D3DRENDERSTATETYPE.ZFUNC;
pub const D3DRS_ALPHAREF = D3DRENDERSTATETYPE.ALPHAREF;
pub const D3DRS_ALPHAFUNC = D3DRENDERSTATETYPE.ALPHAFUNC;
pub const D3DRS_DITHERENABLE = D3DRENDERSTATETYPE.DITHERENABLE;
pub const D3DRS_ALPHABLENDENABLE = D3DRENDERSTATETYPE.ALPHABLENDENABLE;
pub const D3DRS_FOGENABLE = D3DRENDERSTATETYPE.FOGENABLE;
pub const D3DRS_SPECULARENABLE = D3DRENDERSTATETYPE.SPECULARENABLE;
pub const D3DRS_FOGCOLOR = D3DRENDERSTATETYPE.FOGCOLOR;
pub const D3DRS_FOGTABLEMODE = D3DRENDERSTATETYPE.FOGTABLEMODE;
pub const D3DRS_FOGSTART = D3DRENDERSTATETYPE.FOGSTART;
pub const D3DRS_FOGEND = D3DRENDERSTATETYPE.FOGEND;
pub const D3DRS_FOGDENSITY = D3DRENDERSTATETYPE.FOGDENSITY;
pub const D3DRS_RANGEFOGENABLE = D3DRENDERSTATETYPE.RANGEFOGENABLE;
pub const D3DRS_STENCILENABLE = D3DRENDERSTATETYPE.STENCILENABLE;
pub const D3DRS_STENCILFAIL = D3DRENDERSTATETYPE.STENCILFAIL;
pub const D3DRS_STENCILZFAIL = D3DRENDERSTATETYPE.STENCILZFAIL;
pub const D3DRS_STENCILPASS = D3DRENDERSTATETYPE.STENCILPASS;
pub const D3DRS_STENCILFUNC = D3DRENDERSTATETYPE.STENCILFUNC;
pub const D3DRS_STENCILREF = D3DRENDERSTATETYPE.STENCILREF;
pub const D3DRS_STENCILMASK = D3DRENDERSTATETYPE.STENCILMASK;
pub const D3DRS_STENCILWRITEMASK = D3DRENDERSTATETYPE.STENCILWRITEMASK;
pub const D3DRS_TEXTUREFACTOR = D3DRENDERSTATETYPE.TEXTUREFACTOR;
pub const D3DRS_WRAP0 = D3DRENDERSTATETYPE.WRAP0;
pub const D3DRS_WRAP1 = D3DRENDERSTATETYPE.WRAP1;
pub const D3DRS_WRAP2 = D3DRENDERSTATETYPE.WRAP2;
pub const D3DRS_WRAP3 = D3DRENDERSTATETYPE.WRAP3;
pub const D3DRS_WRAP4 = D3DRENDERSTATETYPE.WRAP4;
pub const D3DRS_WRAP5 = D3DRENDERSTATETYPE.WRAP5;
pub const D3DRS_WRAP6 = D3DRENDERSTATETYPE.WRAP6;
pub const D3DRS_WRAP7 = D3DRENDERSTATETYPE.WRAP7;
pub const D3DRS_CLIPPING = D3DRENDERSTATETYPE.CLIPPING;
pub const D3DRS_LIGHTING = D3DRENDERSTATETYPE.LIGHTING;
pub const D3DRS_AMBIENT = D3DRENDERSTATETYPE.AMBIENT;
pub const D3DRS_FOGVERTEXMODE = D3DRENDERSTATETYPE.FOGVERTEXMODE;
pub const D3DRS_COLORVERTEX = D3DRENDERSTATETYPE.COLORVERTEX;
pub const D3DRS_LOCALVIEWER = D3DRENDERSTATETYPE.LOCALVIEWER;
pub const D3DRS_NORMALIZENORMALS = D3DRENDERSTATETYPE.NORMALIZENORMALS;
pub const D3DRS_DIFFUSEMATERIALSOURCE = D3DRENDERSTATETYPE.DIFFUSEMATERIALSOURCE;
pub const D3DRS_SPECULARMATERIALSOURCE = D3DRENDERSTATETYPE.SPECULARMATERIALSOURCE;
pub const D3DRS_AMBIENTMATERIALSOURCE = D3DRENDERSTATETYPE.AMBIENTMATERIALSOURCE;
pub const D3DRS_EMISSIVEMATERIALSOURCE = D3DRENDERSTATETYPE.EMISSIVEMATERIALSOURCE;
pub const D3DRS_VERTEXBLEND = D3DRENDERSTATETYPE.VERTEXBLEND;
pub const D3DRS_CLIPPLANEENABLE = D3DRENDERSTATETYPE.CLIPPLANEENABLE;
pub const D3DRS_POINTSIZE = D3DRENDERSTATETYPE.POINTSIZE;
pub const D3DRS_POINTSIZE_MIN = D3DRENDERSTATETYPE.POINTSIZE_MIN;
pub const D3DRS_POINTSPRITEENABLE = D3DRENDERSTATETYPE.POINTSPRITEENABLE;
pub const D3DRS_POINTSCALEENABLE = D3DRENDERSTATETYPE.POINTSCALEENABLE;
pub const D3DRS_POINTSCALE_A = D3DRENDERSTATETYPE.POINTSCALE_A;
pub const D3DRS_POINTSCALE_B = D3DRENDERSTATETYPE.POINTSCALE_B;
pub const D3DRS_POINTSCALE_C = D3DRENDERSTATETYPE.POINTSCALE_C;
pub const D3DRS_MULTISAMPLEANTIALIAS = D3DRENDERSTATETYPE.MULTISAMPLEANTIALIAS;
pub const D3DRS_MULTISAMPLEMASK = D3DRENDERSTATETYPE.MULTISAMPLEMASK;
pub const D3DRS_PATCHEDGESTYLE = D3DRENDERSTATETYPE.PATCHEDGESTYLE;
pub const D3DRS_DEBUGMONITORTOKEN = D3DRENDERSTATETYPE.DEBUGMONITORTOKEN;
pub const D3DRS_POINTSIZE_MAX = D3DRENDERSTATETYPE.POINTSIZE_MAX;
pub const D3DRS_INDEXEDVERTEXBLENDENABLE = D3DRENDERSTATETYPE.INDEXEDVERTEXBLENDENABLE;
pub const D3DRS_COLORWRITEENABLE = D3DRENDERSTATETYPE.COLORWRITEENABLE;
pub const D3DRS_TWEENFACTOR = D3DRENDERSTATETYPE.TWEENFACTOR;
pub const D3DRS_BLENDOP = D3DRENDERSTATETYPE.BLENDOP;
pub const D3DRS_POSITIONDEGREE = D3DRENDERSTATETYPE.POSITIONDEGREE;
pub const D3DRS_NORMALDEGREE = D3DRENDERSTATETYPE.NORMALDEGREE;
pub const D3DRS_SCISSORTESTENABLE = D3DRENDERSTATETYPE.SCISSORTESTENABLE;
pub const D3DRS_SLOPESCALEDEPTHBIAS = D3DRENDERSTATETYPE.SLOPESCALEDEPTHBIAS;
pub const D3DRS_ANTIALIASEDLINEENABLE = D3DRENDERSTATETYPE.ANTIALIASEDLINEENABLE;
pub const D3DRS_MINTESSELLATIONLEVEL = D3DRENDERSTATETYPE.MINTESSELLATIONLEVEL;
pub const D3DRS_MAXTESSELLATIONLEVEL = D3DRENDERSTATETYPE.MAXTESSELLATIONLEVEL;
pub const D3DRS_ADAPTIVETESS_X = D3DRENDERSTATETYPE.ADAPTIVETESS_X;
pub const D3DRS_ADAPTIVETESS_Y = D3DRENDERSTATETYPE.ADAPTIVETESS_Y;
pub const D3DRS_ADAPTIVETESS_Z = D3DRENDERSTATETYPE.ADAPTIVETESS_Z;
pub const D3DRS_ADAPTIVETESS_W = D3DRENDERSTATETYPE.ADAPTIVETESS_W;
pub const D3DRS_ENABLEADAPTIVETESSELLATION = D3DRENDERSTATETYPE.ENABLEADAPTIVETESSELLATION;
pub const D3DRS_TWOSIDEDSTENCILMODE = D3DRENDERSTATETYPE.TWOSIDEDSTENCILMODE;
pub const D3DRS_CCW_STENCILFAIL = D3DRENDERSTATETYPE.CCW_STENCILFAIL;
pub const D3DRS_CCW_STENCILZFAIL = D3DRENDERSTATETYPE.CCW_STENCILZFAIL;
pub const D3DRS_CCW_STENCILPASS = D3DRENDERSTATETYPE.CCW_STENCILPASS;
pub const D3DRS_CCW_STENCILFUNC = D3DRENDERSTATETYPE.CCW_STENCILFUNC;
pub const D3DRS_COLORWRITEENABLE1 = D3DRENDERSTATETYPE.COLORWRITEENABLE1;
pub const D3DRS_COLORWRITEENABLE2 = D3DRENDERSTATETYPE.COLORWRITEENABLE2;
pub const D3DRS_COLORWRITEENABLE3 = D3DRENDERSTATETYPE.COLORWRITEENABLE3;
pub const D3DRS_BLENDFACTOR = D3DRENDERSTATETYPE.BLENDFACTOR;
pub const D3DRS_SRGBWRITEENABLE = D3DRENDERSTATETYPE.SRGBWRITEENABLE;
pub const D3DRS_DEPTHBIAS = D3DRENDERSTATETYPE.DEPTHBIAS;
pub const D3DRS_WRAP8 = D3DRENDERSTATETYPE.WRAP8;
pub const D3DRS_WRAP9 = D3DRENDERSTATETYPE.WRAP9;
pub const D3DRS_WRAP10 = D3DRENDERSTATETYPE.WRAP10;
pub const D3DRS_WRAP11 = D3DRENDERSTATETYPE.WRAP11;
pub const D3DRS_WRAP12 = D3DRENDERSTATETYPE.WRAP12;
pub const D3DRS_WRAP13 = D3DRENDERSTATETYPE.WRAP13;
pub const D3DRS_WRAP14 = D3DRENDERSTATETYPE.WRAP14;
pub const D3DRS_WRAP15 = D3DRENDERSTATETYPE.WRAP15;
pub const D3DRS_SEPARATEALPHABLENDENABLE = D3DRENDERSTATETYPE.SEPARATEALPHABLENDENABLE;
pub const D3DRS_SRCBLENDALPHA = D3DRENDERSTATETYPE.SRCBLENDALPHA;
pub const D3DRS_DESTBLENDALPHA = D3DRENDERSTATETYPE.DESTBLENDALPHA;
pub const D3DRS_BLENDOPALPHA = D3DRENDERSTATETYPE.BLENDOPALPHA;
pub const D3DRS_FORCE_DWORD = D3DRENDERSTATETYPE.FORCE_DWORD;

pub const D3DMATERIALCOLORSOURCE = enum(i32) {
    MATERIAL = 0,
    COLOR1 = 1,
    COLOR2 = 2,
    FORCE_DWORD = 2147483647,
};
pub const D3DMCS_MATERIAL = D3DMATERIALCOLORSOURCE.MATERIAL;
pub const D3DMCS_COLOR1 = D3DMATERIALCOLORSOURCE.COLOR1;
pub const D3DMCS_COLOR2 = D3DMATERIALCOLORSOURCE.COLOR2;
pub const D3DMCS_FORCE_DWORD = D3DMATERIALCOLORSOURCE.FORCE_DWORD;

pub const D3DTEXTURESTAGESTATETYPE = enum(i32) {
    COLOROP = 1,
    COLORARG1 = 2,
    COLORARG2 = 3,
    ALPHAOP = 4,
    ALPHAARG1 = 5,
    ALPHAARG2 = 6,
    BUMPENVMAT00 = 7,
    BUMPENVMAT01 = 8,
    BUMPENVMAT10 = 9,
    BUMPENVMAT11 = 10,
    TEXCOORDINDEX = 11,
    BUMPENVLSCALE = 22,
    BUMPENVLOFFSET = 23,
    TEXTURETRANSFORMFLAGS = 24,
    COLORARG0 = 26,
    ALPHAARG0 = 27,
    RESULTARG = 28,
    CONSTANT = 32,
    FORCE_DWORD = 2147483647,
};
pub const D3DTSS_COLOROP = D3DTEXTURESTAGESTATETYPE.COLOROP;
pub const D3DTSS_COLORARG1 = D3DTEXTURESTAGESTATETYPE.COLORARG1;
pub const D3DTSS_COLORARG2 = D3DTEXTURESTAGESTATETYPE.COLORARG2;
pub const D3DTSS_ALPHAOP = D3DTEXTURESTAGESTATETYPE.ALPHAOP;
pub const D3DTSS_ALPHAARG1 = D3DTEXTURESTAGESTATETYPE.ALPHAARG1;
pub const D3DTSS_ALPHAARG2 = D3DTEXTURESTAGESTATETYPE.ALPHAARG2;
pub const D3DTSS_BUMPENVMAT00 = D3DTEXTURESTAGESTATETYPE.BUMPENVMAT00;
pub const D3DTSS_BUMPENVMAT01 = D3DTEXTURESTAGESTATETYPE.BUMPENVMAT01;
pub const D3DTSS_BUMPENVMAT10 = D3DTEXTURESTAGESTATETYPE.BUMPENVMAT10;
pub const D3DTSS_BUMPENVMAT11 = D3DTEXTURESTAGESTATETYPE.BUMPENVMAT11;
pub const D3DTSS_TEXCOORDINDEX = D3DTEXTURESTAGESTATETYPE.TEXCOORDINDEX;
pub const D3DTSS_BUMPENVLSCALE = D3DTEXTURESTAGESTATETYPE.BUMPENVLSCALE;
pub const D3DTSS_BUMPENVLOFFSET = D3DTEXTURESTAGESTATETYPE.BUMPENVLOFFSET;
pub const D3DTSS_TEXTURETRANSFORMFLAGS = D3DTEXTURESTAGESTATETYPE.TEXTURETRANSFORMFLAGS;
pub const D3DTSS_COLORARG0 = D3DTEXTURESTAGESTATETYPE.COLORARG0;
pub const D3DTSS_ALPHAARG0 = D3DTEXTURESTAGESTATETYPE.ALPHAARG0;
pub const D3DTSS_RESULTARG = D3DTEXTURESTAGESTATETYPE.RESULTARG;
pub const D3DTSS_CONSTANT = D3DTEXTURESTAGESTATETYPE.CONSTANT;
pub const D3DTSS_FORCE_DWORD = D3DTEXTURESTAGESTATETYPE.FORCE_DWORD;

pub const D3DSAMPLERSTATETYPE = enum(i32) {
    ADDRESSU = 1,
    ADDRESSV = 2,
    ADDRESSW = 3,
    BORDERCOLOR = 4,
    MAGFILTER = 5,
    MINFILTER = 6,
    MIPFILTER = 7,
    MIPMAPLODBIAS = 8,
    MAXMIPLEVEL = 9,
    MAXANISOTROPY = 10,
    SRGBTEXTURE = 11,
    ELEMENTINDEX = 12,
    DMAPOFFSET = 13,
    FORCE_DWORD = 2147483647,
};
pub const D3DSAMP_ADDRESSU = D3DSAMPLERSTATETYPE.ADDRESSU;
pub const D3DSAMP_ADDRESSV = D3DSAMPLERSTATETYPE.ADDRESSV;
pub const D3DSAMP_ADDRESSW = D3DSAMPLERSTATETYPE.ADDRESSW;
pub const D3DSAMP_BORDERCOLOR = D3DSAMPLERSTATETYPE.BORDERCOLOR;
pub const D3DSAMP_MAGFILTER = D3DSAMPLERSTATETYPE.MAGFILTER;
pub const D3DSAMP_MINFILTER = D3DSAMPLERSTATETYPE.MINFILTER;
pub const D3DSAMP_MIPFILTER = D3DSAMPLERSTATETYPE.MIPFILTER;
pub const D3DSAMP_MIPMAPLODBIAS = D3DSAMPLERSTATETYPE.MIPMAPLODBIAS;
pub const D3DSAMP_MAXMIPLEVEL = D3DSAMPLERSTATETYPE.MAXMIPLEVEL;
pub const D3DSAMP_MAXANISOTROPY = D3DSAMPLERSTATETYPE.MAXANISOTROPY;
pub const D3DSAMP_SRGBTEXTURE = D3DSAMPLERSTATETYPE.SRGBTEXTURE;
pub const D3DSAMP_ELEMENTINDEX = D3DSAMPLERSTATETYPE.ELEMENTINDEX;
pub const D3DSAMP_DMAPOFFSET = D3DSAMPLERSTATETYPE.DMAPOFFSET;
pub const D3DSAMP_FORCE_DWORD = D3DSAMPLERSTATETYPE.FORCE_DWORD;

pub const D3DTEXTUREOP = enum(i32) {
    DISABLE = 1,
    SELECTARG1 = 2,
    SELECTARG2 = 3,
    MODULATE = 4,
    MODULATE2X = 5,
    MODULATE4X = 6,
    ADD = 7,
    ADDSIGNED = 8,
    ADDSIGNED2X = 9,
    SUBTRACT = 10,
    ADDSMOOTH = 11,
    BLENDDIFFUSEALPHA = 12,
    BLENDTEXTUREALPHA = 13,
    BLENDFACTORALPHA = 14,
    BLENDTEXTUREALPHAPM = 15,
    BLENDCURRENTALPHA = 16,
    PREMODULATE = 17,
    MODULATEALPHA_ADDCOLOR = 18,
    MODULATECOLOR_ADDALPHA = 19,
    MODULATEINVALPHA_ADDCOLOR = 20,
    MODULATEINVCOLOR_ADDALPHA = 21,
    BUMPENVMAP = 22,
    BUMPENVMAPLUMINANCE = 23,
    DOTPRODUCT3 = 24,
    MULTIPLYADD = 25,
    LERP = 26,
    FORCE_DWORD = 2147483647,
};
pub const D3DTOP_DISABLE = D3DTEXTUREOP.DISABLE;
pub const D3DTOP_SELECTARG1 = D3DTEXTUREOP.SELECTARG1;
pub const D3DTOP_SELECTARG2 = D3DTEXTUREOP.SELECTARG2;
pub const D3DTOP_MODULATE = D3DTEXTUREOP.MODULATE;
pub const D3DTOP_MODULATE2X = D3DTEXTUREOP.MODULATE2X;
pub const D3DTOP_MODULATE4X = D3DTEXTUREOP.MODULATE4X;
pub const D3DTOP_ADD = D3DTEXTUREOP.ADD;
pub const D3DTOP_ADDSIGNED = D3DTEXTUREOP.ADDSIGNED;
pub const D3DTOP_ADDSIGNED2X = D3DTEXTUREOP.ADDSIGNED2X;
pub const D3DTOP_SUBTRACT = D3DTEXTUREOP.SUBTRACT;
pub const D3DTOP_ADDSMOOTH = D3DTEXTUREOP.ADDSMOOTH;
pub const D3DTOP_BLENDDIFFUSEALPHA = D3DTEXTUREOP.BLENDDIFFUSEALPHA;
pub const D3DTOP_BLENDTEXTUREALPHA = D3DTEXTUREOP.BLENDTEXTUREALPHA;
pub const D3DTOP_BLENDFACTORALPHA = D3DTEXTUREOP.BLENDFACTORALPHA;
pub const D3DTOP_BLENDTEXTUREALPHAPM = D3DTEXTUREOP.BLENDTEXTUREALPHAPM;
pub const D3DTOP_BLENDCURRENTALPHA = D3DTEXTUREOP.BLENDCURRENTALPHA;
pub const D3DTOP_PREMODULATE = D3DTEXTUREOP.PREMODULATE;
pub const D3DTOP_MODULATEALPHA_ADDCOLOR = D3DTEXTUREOP.MODULATEALPHA_ADDCOLOR;
pub const D3DTOP_MODULATECOLOR_ADDALPHA = D3DTEXTUREOP.MODULATECOLOR_ADDALPHA;
pub const D3DTOP_MODULATEINVALPHA_ADDCOLOR = D3DTEXTUREOP.MODULATEINVALPHA_ADDCOLOR;
pub const D3DTOP_MODULATEINVCOLOR_ADDALPHA = D3DTEXTUREOP.MODULATEINVCOLOR_ADDALPHA;
pub const D3DTOP_BUMPENVMAP = D3DTEXTUREOP.BUMPENVMAP;
pub const D3DTOP_BUMPENVMAPLUMINANCE = D3DTEXTUREOP.BUMPENVMAPLUMINANCE;
pub const D3DTOP_DOTPRODUCT3 = D3DTEXTUREOP.DOTPRODUCT3;
pub const D3DTOP_MULTIPLYADD = D3DTEXTUREOP.MULTIPLYADD;
pub const D3DTOP_LERP = D3DTEXTUREOP.LERP;
pub const D3DTOP_FORCE_DWORD = D3DTEXTUREOP.FORCE_DWORD;

pub const D3DTEXTUREFILTERTYPE = enum(i32) {
    NONE = 0,
    POINT = 1,
    LINEAR = 2,
    ANISOTROPIC = 3,
    PYRAMIDALQUAD = 6,
    GAUSSIANQUAD = 7,
    CONVOLUTIONMONO = 8,
    FORCE_DWORD = 2147483647,
};
pub const D3DTEXF_NONE = D3DTEXTUREFILTERTYPE.NONE;
pub const D3DTEXF_POINT = D3DTEXTUREFILTERTYPE.POINT;
pub const D3DTEXF_LINEAR = D3DTEXTUREFILTERTYPE.LINEAR;
pub const D3DTEXF_ANISOTROPIC = D3DTEXTUREFILTERTYPE.ANISOTROPIC;
pub const D3DTEXF_PYRAMIDALQUAD = D3DTEXTUREFILTERTYPE.PYRAMIDALQUAD;
pub const D3DTEXF_GAUSSIANQUAD = D3DTEXTUREFILTERTYPE.GAUSSIANQUAD;
pub const D3DTEXF_CONVOLUTIONMONO = D3DTEXTUREFILTERTYPE.CONVOLUTIONMONO;
pub const D3DTEXF_FORCE_DWORD = D3DTEXTUREFILTERTYPE.FORCE_DWORD;

pub const D3DDECLUSAGE = enum(i32) {
    POSITION = 0,
    BLENDWEIGHT = 1,
    BLENDINDICES = 2,
    NORMAL = 3,
    PSIZE = 4,
    TEXCOORD = 5,
    TANGENT = 6,
    BINORMAL = 7,
    TESSFACTOR = 8,
    POSITIONT = 9,
    COLOR = 10,
    FOG = 11,
    DEPTH = 12,
    SAMPLE = 13,
};
pub const D3DDECLUSAGE_POSITION = D3DDECLUSAGE.POSITION;
pub const D3DDECLUSAGE_BLENDWEIGHT = D3DDECLUSAGE.BLENDWEIGHT;
pub const D3DDECLUSAGE_BLENDINDICES = D3DDECLUSAGE.BLENDINDICES;
pub const D3DDECLUSAGE_NORMAL = D3DDECLUSAGE.NORMAL;
pub const D3DDECLUSAGE_PSIZE = D3DDECLUSAGE.PSIZE;
pub const D3DDECLUSAGE_TEXCOORD = D3DDECLUSAGE.TEXCOORD;
pub const D3DDECLUSAGE_TANGENT = D3DDECLUSAGE.TANGENT;
pub const D3DDECLUSAGE_BINORMAL = D3DDECLUSAGE.BINORMAL;
pub const D3DDECLUSAGE_TESSFACTOR = D3DDECLUSAGE.TESSFACTOR;
pub const D3DDECLUSAGE_POSITIONT = D3DDECLUSAGE.POSITIONT;
pub const D3DDECLUSAGE_COLOR = D3DDECLUSAGE.COLOR;
pub const D3DDECLUSAGE_FOG = D3DDECLUSAGE.FOG;
pub const D3DDECLUSAGE_DEPTH = D3DDECLUSAGE.DEPTH;
pub const D3DDECLUSAGE_SAMPLE = D3DDECLUSAGE.SAMPLE;

pub const D3DDECLMETHOD = enum(i32) {
    DEFAULT = 0,
    PARTIALU = 1,
    PARTIALV = 2,
    CROSSUV = 3,
    UV = 4,
    LOOKUP = 5,
    LOOKUPPRESAMPLED = 6,
};
pub const D3DDECLMETHOD_DEFAULT = D3DDECLMETHOD.DEFAULT;
pub const D3DDECLMETHOD_PARTIALU = D3DDECLMETHOD.PARTIALU;
pub const D3DDECLMETHOD_PARTIALV = D3DDECLMETHOD.PARTIALV;
pub const D3DDECLMETHOD_CROSSUV = D3DDECLMETHOD.CROSSUV;
pub const D3DDECLMETHOD_UV = D3DDECLMETHOD.UV;
pub const D3DDECLMETHOD_LOOKUP = D3DDECLMETHOD.LOOKUP;
pub const D3DDECLMETHOD_LOOKUPPRESAMPLED = D3DDECLMETHOD.LOOKUPPRESAMPLED;

pub const D3DDECLTYPE = enum(i32) {
    FLOAT1 = 0,
    FLOAT2 = 1,
    FLOAT3 = 2,
    FLOAT4 = 3,
    D3DCOLOR = 4,
    UBYTE4 = 5,
    SHORT2 = 6,
    SHORT4 = 7,
    UBYTE4N = 8,
    SHORT2N = 9,
    SHORT4N = 10,
    USHORT2N = 11,
    USHORT4N = 12,
    UDEC3 = 13,
    DEC3N = 14,
    FLOAT16_2 = 15,
    FLOAT16_4 = 16,
    UNUSED = 17,
};
pub const D3DDECLTYPE_FLOAT1 = D3DDECLTYPE.FLOAT1;
pub const D3DDECLTYPE_FLOAT2 = D3DDECLTYPE.FLOAT2;
pub const D3DDECLTYPE_FLOAT3 = D3DDECLTYPE.FLOAT3;
pub const D3DDECLTYPE_FLOAT4 = D3DDECLTYPE.FLOAT4;
pub const D3DDECLTYPE_D3DCOLOR = D3DDECLTYPE.D3DCOLOR;
pub const D3DDECLTYPE_UBYTE4 = D3DDECLTYPE.UBYTE4;
pub const D3DDECLTYPE_SHORT2 = D3DDECLTYPE.SHORT2;
pub const D3DDECLTYPE_SHORT4 = D3DDECLTYPE.SHORT4;
pub const D3DDECLTYPE_UBYTE4N = D3DDECLTYPE.UBYTE4N;
pub const D3DDECLTYPE_SHORT2N = D3DDECLTYPE.SHORT2N;
pub const D3DDECLTYPE_SHORT4N = D3DDECLTYPE.SHORT4N;
pub const D3DDECLTYPE_USHORT2N = D3DDECLTYPE.USHORT2N;
pub const D3DDECLTYPE_USHORT4N = D3DDECLTYPE.USHORT4N;
pub const D3DDECLTYPE_UDEC3 = D3DDECLTYPE.UDEC3;
pub const D3DDECLTYPE_DEC3N = D3DDECLTYPE.DEC3N;
pub const D3DDECLTYPE_FLOAT16_2 = D3DDECLTYPE.FLOAT16_2;
pub const D3DDECLTYPE_FLOAT16_4 = D3DDECLTYPE.FLOAT16_4;
pub const D3DDECLTYPE_UNUSED = D3DDECLTYPE.UNUSED;

pub const D3DVERTEXELEMENT9 = extern struct {
    Stream: u16,
    Offset: u16,
    Type: u8,
    Method: u8,
    Usage: u8,
    UsageIndex: u8,
};

pub const D3DSHADER_INSTRUCTION_OPCODE_TYPE = enum(i32) {
    NOP = 0,
    MOV = 1,
    ADD = 2,
    SUB = 3,
    MAD = 4,
    MUL = 5,
    RCP = 6,
    RSQ = 7,
    DP3 = 8,
    DP4 = 9,
    MIN = 10,
    MAX = 11,
    SLT = 12,
    SGE = 13,
    EXP = 14,
    LOG = 15,
    LIT = 16,
    DST = 17,
    LRP = 18,
    FRC = 19,
    M4x4 = 20,
    M4x3 = 21,
    M3x4 = 22,
    M3x3 = 23,
    M3x2 = 24,
    CALL = 25,
    CALLNZ = 26,
    LOOP = 27,
    RET = 28,
    ENDLOOP = 29,
    LABEL = 30,
    DCL = 31,
    POW = 32,
    CRS = 33,
    SGN = 34,
    ABS = 35,
    NRM = 36,
    SINCOS = 37,
    REP = 38,
    ENDREP = 39,
    IF = 40,
    IFC = 41,
    ELSE = 42,
    ENDIF = 43,
    BREAK = 44,
    BREAKC = 45,
    MOVA = 46,
    DEFB = 47,
    DEFI = 48,
    TEXCOORD = 64,
    TEXKILL = 65,
    TEX = 66,
    TEXBEM = 67,
    TEXBEML = 68,
    TEXREG2AR = 69,
    TEXREG2GB = 70,
    TEXM3x2PAD = 71,
    TEXM3x2TEX = 72,
    TEXM3x3PAD = 73,
    TEXM3x3TEX = 74,
    RESERVED0 = 75,
    TEXM3x3SPEC = 76,
    TEXM3x3VSPEC = 77,
    EXPP = 78,
    LOGP = 79,
    CND = 80,
    DEF = 81,
    TEXREG2RGB = 82,
    TEXDP3TEX = 83,
    TEXM3x2DEPTH = 84,
    TEXDP3 = 85,
    TEXM3x3 = 86,
    TEXDEPTH = 87,
    CMP = 88,
    BEM = 89,
    DP2ADD = 90,
    DSX = 91,
    DSY = 92,
    TEXLDD = 93,
    SETP = 94,
    TEXLDL = 95,
    BREAKP = 96,
    PHASE = 65533,
    COMMENT = 65534,
    END = 65535,
    FORCE_DWORD = 2147483647,
};
pub const D3DSIO_NOP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.NOP;
pub const D3DSIO_MOV = D3DSHADER_INSTRUCTION_OPCODE_TYPE.MOV;
pub const D3DSIO_ADD = D3DSHADER_INSTRUCTION_OPCODE_TYPE.ADD;
pub const D3DSIO_SUB = D3DSHADER_INSTRUCTION_OPCODE_TYPE.SUB;
pub const D3DSIO_MAD = D3DSHADER_INSTRUCTION_OPCODE_TYPE.MAD;
pub const D3DSIO_MUL = D3DSHADER_INSTRUCTION_OPCODE_TYPE.MUL;
pub const D3DSIO_RCP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.RCP;
pub const D3DSIO_RSQ = D3DSHADER_INSTRUCTION_OPCODE_TYPE.RSQ;
pub const D3DSIO_DP3 = D3DSHADER_INSTRUCTION_OPCODE_TYPE.DP3;
pub const D3DSIO_DP4 = D3DSHADER_INSTRUCTION_OPCODE_TYPE.DP4;
pub const D3DSIO_MIN = D3DSHADER_INSTRUCTION_OPCODE_TYPE.MIN;
pub const D3DSIO_MAX = D3DSHADER_INSTRUCTION_OPCODE_TYPE.MAX;
pub const D3DSIO_SLT = D3DSHADER_INSTRUCTION_OPCODE_TYPE.SLT;
pub const D3DSIO_SGE = D3DSHADER_INSTRUCTION_OPCODE_TYPE.SGE;
pub const D3DSIO_EXP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.EXP;
pub const D3DSIO_LOG = D3DSHADER_INSTRUCTION_OPCODE_TYPE.LOG;
pub const D3DSIO_LIT = D3DSHADER_INSTRUCTION_OPCODE_TYPE.LIT;
pub const D3DSIO_DST = D3DSHADER_INSTRUCTION_OPCODE_TYPE.DST;
pub const D3DSIO_LRP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.LRP;
pub const D3DSIO_FRC = D3DSHADER_INSTRUCTION_OPCODE_TYPE.FRC;
pub const D3DSIO_M4x4 = D3DSHADER_INSTRUCTION_OPCODE_TYPE.M4x4;
pub const D3DSIO_M4x3 = D3DSHADER_INSTRUCTION_OPCODE_TYPE.M4x3;
pub const D3DSIO_M3x4 = D3DSHADER_INSTRUCTION_OPCODE_TYPE.M3x4;
pub const D3DSIO_M3x3 = D3DSHADER_INSTRUCTION_OPCODE_TYPE.M3x3;
pub const D3DSIO_M3x2 = D3DSHADER_INSTRUCTION_OPCODE_TYPE.M3x2;
pub const D3DSIO_CALL = D3DSHADER_INSTRUCTION_OPCODE_TYPE.CALL;
pub const D3DSIO_CALLNZ = D3DSHADER_INSTRUCTION_OPCODE_TYPE.CALLNZ;
pub const D3DSIO_LOOP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.LOOP;
pub const D3DSIO_RET = D3DSHADER_INSTRUCTION_OPCODE_TYPE.RET;
pub const D3DSIO_ENDLOOP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.ENDLOOP;
pub const D3DSIO_LABEL = D3DSHADER_INSTRUCTION_OPCODE_TYPE.LABEL;
pub const D3DSIO_DCL = D3DSHADER_INSTRUCTION_OPCODE_TYPE.DCL;
pub const D3DSIO_POW = D3DSHADER_INSTRUCTION_OPCODE_TYPE.POW;
pub const D3DSIO_CRS = D3DSHADER_INSTRUCTION_OPCODE_TYPE.CRS;
pub const D3DSIO_SGN = D3DSHADER_INSTRUCTION_OPCODE_TYPE.SGN;
pub const D3DSIO_ABS = D3DSHADER_INSTRUCTION_OPCODE_TYPE.ABS;
pub const D3DSIO_NRM = D3DSHADER_INSTRUCTION_OPCODE_TYPE.NRM;
pub const D3DSIO_SINCOS = D3DSHADER_INSTRUCTION_OPCODE_TYPE.SINCOS;
pub const D3DSIO_REP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.REP;
pub const D3DSIO_ENDREP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.ENDREP;
pub const D3DSIO_IF = D3DSHADER_INSTRUCTION_OPCODE_TYPE.IF;
pub const D3DSIO_IFC = D3DSHADER_INSTRUCTION_OPCODE_TYPE.IFC;
pub const D3DSIO_ELSE = D3DSHADER_INSTRUCTION_OPCODE_TYPE.ELSE;
pub const D3DSIO_ENDIF = D3DSHADER_INSTRUCTION_OPCODE_TYPE.ENDIF;
pub const D3DSIO_BREAK = D3DSHADER_INSTRUCTION_OPCODE_TYPE.BREAK;
pub const D3DSIO_BREAKC = D3DSHADER_INSTRUCTION_OPCODE_TYPE.BREAKC;
pub const D3DSIO_MOVA = D3DSHADER_INSTRUCTION_OPCODE_TYPE.MOVA;
pub const D3DSIO_DEFB = D3DSHADER_INSTRUCTION_OPCODE_TYPE.DEFB;
pub const D3DSIO_DEFI = D3DSHADER_INSTRUCTION_OPCODE_TYPE.DEFI;
pub const D3DSIO_TEXCOORD = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXCOORD;
pub const D3DSIO_TEXKILL = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXKILL;
pub const D3DSIO_TEX = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEX;
pub const D3DSIO_TEXBEM = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXBEM;
pub const D3DSIO_TEXBEML = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXBEML;
pub const D3DSIO_TEXREG2AR = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXREG2AR;
pub const D3DSIO_TEXREG2GB = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXREG2GB;
pub const D3DSIO_TEXM3x2PAD = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXM3x2PAD;
pub const D3DSIO_TEXM3x2TEX = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXM3x2TEX;
pub const D3DSIO_TEXM3x3PAD = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXM3x3PAD;
pub const D3DSIO_TEXM3x3TEX = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXM3x3TEX;
pub const D3DSIO_RESERVED0 = D3DSHADER_INSTRUCTION_OPCODE_TYPE.RESERVED0;
pub const D3DSIO_TEXM3x3SPEC = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXM3x3SPEC;
pub const D3DSIO_TEXM3x3VSPEC = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXM3x3VSPEC;
pub const D3DSIO_EXPP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.EXPP;
pub const D3DSIO_LOGP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.LOGP;
pub const D3DSIO_CND = D3DSHADER_INSTRUCTION_OPCODE_TYPE.CND;
pub const D3DSIO_DEF = D3DSHADER_INSTRUCTION_OPCODE_TYPE.DEF;
pub const D3DSIO_TEXREG2RGB = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXREG2RGB;
pub const D3DSIO_TEXDP3TEX = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXDP3TEX;
pub const D3DSIO_TEXM3x2DEPTH = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXM3x2DEPTH;
pub const D3DSIO_TEXDP3 = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXDP3;
pub const D3DSIO_TEXM3x3 = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXM3x3;
pub const D3DSIO_TEXDEPTH = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXDEPTH;
pub const D3DSIO_CMP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.CMP;
pub const D3DSIO_BEM = D3DSHADER_INSTRUCTION_OPCODE_TYPE.BEM;
pub const D3DSIO_DP2ADD = D3DSHADER_INSTRUCTION_OPCODE_TYPE.DP2ADD;
pub const D3DSIO_DSX = D3DSHADER_INSTRUCTION_OPCODE_TYPE.DSX;
pub const D3DSIO_DSY = D3DSHADER_INSTRUCTION_OPCODE_TYPE.DSY;
pub const D3DSIO_TEXLDD = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXLDD;
pub const D3DSIO_SETP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.SETP;
pub const D3DSIO_TEXLDL = D3DSHADER_INSTRUCTION_OPCODE_TYPE.TEXLDL;
pub const D3DSIO_BREAKP = D3DSHADER_INSTRUCTION_OPCODE_TYPE.BREAKP;
pub const D3DSIO_PHASE = D3DSHADER_INSTRUCTION_OPCODE_TYPE.PHASE;
pub const D3DSIO_COMMENT = D3DSHADER_INSTRUCTION_OPCODE_TYPE.COMMENT;
pub const D3DSIO_END = D3DSHADER_INSTRUCTION_OPCODE_TYPE.END;
pub const D3DSIO_FORCE_DWORD = D3DSHADER_INSTRUCTION_OPCODE_TYPE.FORCE_DWORD;

pub const D3DSHADER_COMPARISON = enum(i32) {
    RESERVED0 = 0,
    GT = 1,
    EQ = 2,
    GE = 3,
    LT = 4,
    NE = 5,
    LE = 6,
    RESERVED1 = 7,
};
pub const D3DSPC_RESERVED0 = D3DSHADER_COMPARISON.RESERVED0;
pub const D3DSPC_GT = D3DSHADER_COMPARISON.GT;
pub const D3DSPC_EQ = D3DSHADER_COMPARISON.EQ;
pub const D3DSPC_GE = D3DSHADER_COMPARISON.GE;
pub const D3DSPC_LT = D3DSHADER_COMPARISON.LT;
pub const D3DSPC_NE = D3DSHADER_COMPARISON.NE;
pub const D3DSPC_LE = D3DSHADER_COMPARISON.LE;
pub const D3DSPC_RESERVED1 = D3DSHADER_COMPARISON.RESERVED1;

pub const D3DSAMPLER_TEXTURE_TYPE = enum(i32) {
    UNKNOWN = 0,
    @"2D" = 268435456,
    CUBE = 402653184,
    VOLUME = 536870912,
    FORCE_DWORD = 2147483647,
};
pub const D3DSTT_UNKNOWN = D3DSAMPLER_TEXTURE_TYPE.UNKNOWN;
pub const D3DSTT_2D = D3DSAMPLER_TEXTURE_TYPE.@"2D";
pub const D3DSTT_CUBE = D3DSAMPLER_TEXTURE_TYPE.CUBE;
pub const D3DSTT_VOLUME = D3DSAMPLER_TEXTURE_TYPE.VOLUME;
pub const D3DSTT_FORCE_DWORD = D3DSAMPLER_TEXTURE_TYPE.FORCE_DWORD;

pub const D3DSHADER_PARAM_REGISTER_TYPE = enum(i32) {
    TEMP = 0,
    INPUT = 1,
    CONST = 2,
    ADDR = 3,
    // TEXTURE = 3, this enum value conflicts with ADDR
    RASTOUT = 4,
    ATTROUT = 5,
    TEXCRDOUT = 6,
    // OUTPUT = 6, this enum value conflicts with TEXCRDOUT
    CONSTINT = 7,
    COLOROUT = 8,
    DEPTHOUT = 9,
    SAMPLER = 10,
    CONST2 = 11,
    CONST3 = 12,
    CONST4 = 13,
    CONSTBOOL = 14,
    LOOP = 15,
    TEMPFLOAT16 = 16,
    MISCTYPE = 17,
    LABEL = 18,
    PREDICATE = 19,
    FORCE_DWORD = 2147483647,
};
pub const D3DSPR_TEMP = D3DSHADER_PARAM_REGISTER_TYPE.TEMP;
pub const D3DSPR_INPUT = D3DSHADER_PARAM_REGISTER_TYPE.INPUT;
pub const D3DSPR_CONST = D3DSHADER_PARAM_REGISTER_TYPE.CONST;
pub const D3DSPR_ADDR = D3DSHADER_PARAM_REGISTER_TYPE.ADDR;
pub const D3DSPR_TEXTURE = D3DSHADER_PARAM_REGISTER_TYPE.ADDR;
pub const D3DSPR_RASTOUT = D3DSHADER_PARAM_REGISTER_TYPE.RASTOUT;
pub const D3DSPR_ATTROUT = D3DSHADER_PARAM_REGISTER_TYPE.ATTROUT;
pub const D3DSPR_TEXCRDOUT = D3DSHADER_PARAM_REGISTER_TYPE.TEXCRDOUT;
pub const D3DSPR_OUTPUT = D3DSHADER_PARAM_REGISTER_TYPE.TEXCRDOUT;
pub const D3DSPR_CONSTINT = D3DSHADER_PARAM_REGISTER_TYPE.CONSTINT;
pub const D3DSPR_COLOROUT = D3DSHADER_PARAM_REGISTER_TYPE.COLOROUT;
pub const D3DSPR_DEPTHOUT = D3DSHADER_PARAM_REGISTER_TYPE.DEPTHOUT;
pub const D3DSPR_SAMPLER = D3DSHADER_PARAM_REGISTER_TYPE.SAMPLER;
pub const D3DSPR_CONST2 = D3DSHADER_PARAM_REGISTER_TYPE.CONST2;
pub const D3DSPR_CONST3 = D3DSHADER_PARAM_REGISTER_TYPE.CONST3;
pub const D3DSPR_CONST4 = D3DSHADER_PARAM_REGISTER_TYPE.CONST4;
pub const D3DSPR_CONSTBOOL = D3DSHADER_PARAM_REGISTER_TYPE.CONSTBOOL;
pub const D3DSPR_LOOP = D3DSHADER_PARAM_REGISTER_TYPE.LOOP;
pub const D3DSPR_TEMPFLOAT16 = D3DSHADER_PARAM_REGISTER_TYPE.TEMPFLOAT16;
pub const D3DSPR_MISCTYPE = D3DSHADER_PARAM_REGISTER_TYPE.MISCTYPE;
pub const D3DSPR_LABEL = D3DSHADER_PARAM_REGISTER_TYPE.LABEL;
pub const D3DSPR_PREDICATE = D3DSHADER_PARAM_REGISTER_TYPE.PREDICATE;
pub const D3DSPR_FORCE_DWORD = D3DSHADER_PARAM_REGISTER_TYPE.FORCE_DWORD;

pub const D3DSHADER_MISCTYPE_OFFSETS = enum(i32) {
    POSITION = 0,
    FACE = 1,
};
pub const D3DSMO_POSITION = D3DSHADER_MISCTYPE_OFFSETS.POSITION;
pub const D3DSMO_FACE = D3DSHADER_MISCTYPE_OFFSETS.FACE;

pub const D3DVS_RASTOUT_OFFSETS = enum(i32) {
    POSITION = 0,
    FOG = 1,
    POINT_SIZE = 2,
    FORCE_DWORD = 2147483647,
};
pub const D3DSRO_POSITION = D3DVS_RASTOUT_OFFSETS.POSITION;
pub const D3DSRO_FOG = D3DVS_RASTOUT_OFFSETS.FOG;
pub const D3DSRO_POINT_SIZE = D3DVS_RASTOUT_OFFSETS.POINT_SIZE;
pub const D3DSRO_FORCE_DWORD = D3DVS_RASTOUT_OFFSETS.FORCE_DWORD;

pub const D3DVS_ADDRESSMODE_TYPE = enum(i32) {
    ABSOLUTE = 0,
    RELATIVE = 8192,
    FORCE_DWORD = 2147483647,
};
pub const D3DVS_ADDRMODE_ABSOLUTE = D3DVS_ADDRESSMODE_TYPE.ABSOLUTE;
pub const D3DVS_ADDRMODE_RELATIVE = D3DVS_ADDRESSMODE_TYPE.RELATIVE;
pub const D3DVS_ADDRMODE_FORCE_DWORD = D3DVS_ADDRESSMODE_TYPE.FORCE_DWORD;

pub const D3DSHADER_ADDRESSMODE_TYPE = enum(i32) {
    ABSOLUTE = 0,
    RELATIVE = 8192,
    FORCE_DWORD = 2147483647,
};
pub const D3DSHADER_ADDRMODE_ABSOLUTE = D3DSHADER_ADDRESSMODE_TYPE.ABSOLUTE;
pub const D3DSHADER_ADDRMODE_RELATIVE = D3DSHADER_ADDRESSMODE_TYPE.RELATIVE;
pub const D3DSHADER_ADDRMODE_FORCE_DWORD = D3DSHADER_ADDRESSMODE_TYPE.FORCE_DWORD;

pub const D3DSHADER_PARAM_SRCMOD_TYPE = enum(i32) {
    NONE = 0,
    NEG = 16777216,
    BIAS = 33554432,
    BIASNEG = 50331648,
    SIGN = 67108864,
    SIGNNEG = 83886080,
    COMP = 100663296,
    X2 = 117440512,
    X2NEG = 134217728,
    DZ = 150994944,
    DW = 167772160,
    ABS = 184549376,
    ABSNEG = 201326592,
    NOT = 218103808,
    FORCE_DWORD = 2147483647,
};
pub const D3DSPSM_NONE = D3DSHADER_PARAM_SRCMOD_TYPE.NONE;
pub const D3DSPSM_NEG = D3DSHADER_PARAM_SRCMOD_TYPE.NEG;
pub const D3DSPSM_BIAS = D3DSHADER_PARAM_SRCMOD_TYPE.BIAS;
pub const D3DSPSM_BIASNEG = D3DSHADER_PARAM_SRCMOD_TYPE.BIASNEG;
pub const D3DSPSM_SIGN = D3DSHADER_PARAM_SRCMOD_TYPE.SIGN;
pub const D3DSPSM_SIGNNEG = D3DSHADER_PARAM_SRCMOD_TYPE.SIGNNEG;
pub const D3DSPSM_COMP = D3DSHADER_PARAM_SRCMOD_TYPE.COMP;
pub const D3DSPSM_X2 = D3DSHADER_PARAM_SRCMOD_TYPE.X2;
pub const D3DSPSM_X2NEG = D3DSHADER_PARAM_SRCMOD_TYPE.X2NEG;
pub const D3DSPSM_DZ = D3DSHADER_PARAM_SRCMOD_TYPE.DZ;
pub const D3DSPSM_DW = D3DSHADER_PARAM_SRCMOD_TYPE.DW;
pub const D3DSPSM_ABS = D3DSHADER_PARAM_SRCMOD_TYPE.ABS;
pub const D3DSPSM_ABSNEG = D3DSHADER_PARAM_SRCMOD_TYPE.ABSNEG;
pub const D3DSPSM_NOT = D3DSHADER_PARAM_SRCMOD_TYPE.NOT;
pub const D3DSPSM_FORCE_DWORD = D3DSHADER_PARAM_SRCMOD_TYPE.FORCE_DWORD;

pub const D3DSHADER_MIN_PRECISION = enum(i32) {
    DEFAULT = 0,
    @"16" = 1,
    @"2_8" = 2,
};
pub const D3DMP_DEFAULT = D3DSHADER_MIN_PRECISION.DEFAULT;
pub const D3DMP_16 = D3DSHADER_MIN_PRECISION.@"16";
pub const D3DMP_2_8 = D3DSHADER_MIN_PRECISION.@"2_8";

pub const D3DBASISTYPE = enum(i32) {
    BEZIER = 0,
    BSPLINE = 1,
    CATMULL_ROM = 2,
    FORCE_DWORD = 2147483647,
};
pub const D3DBASIS_BEZIER = D3DBASISTYPE.BEZIER;
pub const D3DBASIS_BSPLINE = D3DBASISTYPE.BSPLINE;
pub const D3DBASIS_CATMULL_ROM = D3DBASISTYPE.CATMULL_ROM;
pub const D3DBASIS_FORCE_DWORD = D3DBASISTYPE.FORCE_DWORD;

pub const D3DDEGREETYPE = enum(i32) {
    LINEAR = 1,
    QUADRATIC = 2,
    CUBIC = 3,
    QUINTIC = 5,
    FORCE_DWORD = 2147483647,
};
pub const D3DDEGREE_LINEAR = D3DDEGREETYPE.LINEAR;
pub const D3DDEGREE_QUADRATIC = D3DDEGREETYPE.QUADRATIC;
pub const D3DDEGREE_CUBIC = D3DDEGREETYPE.CUBIC;
pub const D3DDEGREE_QUINTIC = D3DDEGREETYPE.QUINTIC;
pub const D3DDEGREE_FORCE_DWORD = D3DDEGREETYPE.FORCE_DWORD;

pub const D3DPATCHEDGESTYLE = enum(i32) {
    DISCRETE = 0,
    CONTINUOUS = 1,
    FORCE_DWORD = 2147483647,
};
pub const D3DPATCHEDGE_DISCRETE = D3DPATCHEDGESTYLE.DISCRETE;
pub const D3DPATCHEDGE_CONTINUOUS = D3DPATCHEDGESTYLE.CONTINUOUS;
pub const D3DPATCHEDGE_FORCE_DWORD = D3DPATCHEDGESTYLE.FORCE_DWORD;

pub const D3DSTATEBLOCKTYPE = enum(i32) {
    ALL = 1,
    PIXELSTATE = 2,
    VERTEXSTATE = 3,
    FORCE_DWORD = 2147483647,
};
pub const D3DSBT_ALL = D3DSTATEBLOCKTYPE.ALL;
pub const D3DSBT_PIXELSTATE = D3DSTATEBLOCKTYPE.PIXELSTATE;
pub const D3DSBT_VERTEXSTATE = D3DSTATEBLOCKTYPE.VERTEXSTATE;
pub const D3DSBT_FORCE_DWORD = D3DSTATEBLOCKTYPE.FORCE_DWORD;

pub const D3DVERTEXBLENDFLAGS = enum(i32) {
    DISABLE = 0,
    @"1WEIGHTS" = 1,
    @"2WEIGHTS" = 2,
    @"3WEIGHTS" = 3,
    TWEENING = 255,
    @"0WEIGHTS" = 256,
    FORCE_DWORD = 2147483647,
};
pub const D3DVBF_DISABLE = D3DVERTEXBLENDFLAGS.DISABLE;
pub const D3DVBF_1WEIGHTS = D3DVERTEXBLENDFLAGS.@"1WEIGHTS";
pub const D3DVBF_2WEIGHTS = D3DVERTEXBLENDFLAGS.@"2WEIGHTS";
pub const D3DVBF_3WEIGHTS = D3DVERTEXBLENDFLAGS.@"3WEIGHTS";
pub const D3DVBF_TWEENING = D3DVERTEXBLENDFLAGS.TWEENING;
pub const D3DVBF_0WEIGHTS = D3DVERTEXBLENDFLAGS.@"0WEIGHTS";
pub const D3DVBF_FORCE_DWORD = D3DVERTEXBLENDFLAGS.FORCE_DWORD;

pub const D3DTEXTURETRANSFORMFLAGS = enum(i32) {
    DISABLE = 0,
    COUNT1 = 1,
    COUNT2 = 2,
    COUNT3 = 3,
    COUNT4 = 4,
    PROJECTED = 256,
    FORCE_DWORD = 2147483647,
};
pub const D3DTTFF_DISABLE = D3DTEXTURETRANSFORMFLAGS.DISABLE;
pub const D3DTTFF_COUNT1 = D3DTEXTURETRANSFORMFLAGS.COUNT1;
pub const D3DTTFF_COUNT2 = D3DTEXTURETRANSFORMFLAGS.COUNT2;
pub const D3DTTFF_COUNT3 = D3DTEXTURETRANSFORMFLAGS.COUNT3;
pub const D3DTTFF_COUNT4 = D3DTEXTURETRANSFORMFLAGS.COUNT4;
pub const D3DTTFF_PROJECTED = D3DTEXTURETRANSFORMFLAGS.PROJECTED;
pub const D3DTTFF_FORCE_DWORD = D3DTEXTURETRANSFORMFLAGS.FORCE_DWORD;

pub const D3DDEVTYPE = enum(u32) {
    HAL = 1,
    REF = 2,
    SW = 3,
    NULLREF = 4,
    FORCE_DWORD = 2147483647,
};
pub const D3DDEVTYPE_HAL = D3DDEVTYPE.HAL;
pub const D3DDEVTYPE_REF = D3DDEVTYPE.REF;
pub const D3DDEVTYPE_SW = D3DDEVTYPE.SW;
pub const D3DDEVTYPE_NULLREF = D3DDEVTYPE.NULLREF;
pub const D3DDEVTYPE_FORCE_DWORD = D3DDEVTYPE.FORCE_DWORD;

pub const D3DMULTISAMPLE_TYPE = enum(i32) {
    NONE = 0,
    NONMASKABLE = 1,
    @"2_SAMPLES" = 2,
    @"3_SAMPLES" = 3,
    @"4_SAMPLES" = 4,
    @"5_SAMPLES" = 5,
    @"6_SAMPLES" = 6,
    @"7_SAMPLES" = 7,
    @"8_SAMPLES" = 8,
    @"9_SAMPLES" = 9,
    @"10_SAMPLES" = 10,
    @"11_SAMPLES" = 11,
    @"12_SAMPLES" = 12,
    @"13_SAMPLES" = 13,
    @"14_SAMPLES" = 14,
    @"15_SAMPLES" = 15,
    @"16_SAMPLES" = 16,
    FORCE_DWORD = 2147483647,
};
pub const D3DMULTISAMPLE_NONE = D3DMULTISAMPLE_TYPE.NONE;
pub const D3DMULTISAMPLE_NONMASKABLE = D3DMULTISAMPLE_TYPE.NONMASKABLE;
pub const D3DMULTISAMPLE_2_SAMPLES = D3DMULTISAMPLE_TYPE.@"2_SAMPLES";
pub const D3DMULTISAMPLE_3_SAMPLES = D3DMULTISAMPLE_TYPE.@"3_SAMPLES";
pub const D3DMULTISAMPLE_4_SAMPLES = D3DMULTISAMPLE_TYPE.@"4_SAMPLES";
pub const D3DMULTISAMPLE_5_SAMPLES = D3DMULTISAMPLE_TYPE.@"5_SAMPLES";
pub const D3DMULTISAMPLE_6_SAMPLES = D3DMULTISAMPLE_TYPE.@"6_SAMPLES";
pub const D3DMULTISAMPLE_7_SAMPLES = D3DMULTISAMPLE_TYPE.@"7_SAMPLES";
pub const D3DMULTISAMPLE_8_SAMPLES = D3DMULTISAMPLE_TYPE.@"8_SAMPLES";
pub const D3DMULTISAMPLE_9_SAMPLES = D3DMULTISAMPLE_TYPE.@"9_SAMPLES";
pub const D3DMULTISAMPLE_10_SAMPLES = D3DMULTISAMPLE_TYPE.@"10_SAMPLES";
pub const D3DMULTISAMPLE_11_SAMPLES = D3DMULTISAMPLE_TYPE.@"11_SAMPLES";
pub const D3DMULTISAMPLE_12_SAMPLES = D3DMULTISAMPLE_TYPE.@"12_SAMPLES";
pub const D3DMULTISAMPLE_13_SAMPLES = D3DMULTISAMPLE_TYPE.@"13_SAMPLES";
pub const D3DMULTISAMPLE_14_SAMPLES = D3DMULTISAMPLE_TYPE.@"14_SAMPLES";
pub const D3DMULTISAMPLE_15_SAMPLES = D3DMULTISAMPLE_TYPE.@"15_SAMPLES";
pub const D3DMULTISAMPLE_16_SAMPLES = D3DMULTISAMPLE_TYPE.@"16_SAMPLES";
pub const D3DMULTISAMPLE_FORCE_DWORD = D3DMULTISAMPLE_TYPE.FORCE_DWORD;

pub const D3DFORMAT = enum(u32) {
    UNKNOWN = 0,
    R8G8B8 = 20,
    A8R8G8B8 = 21,
    X8R8G8B8 = 22,
    R5G6B5 = 23,
    X1R5G5B5 = 24,
    A1R5G5B5 = 25,
    A4R4G4B4 = 26,
    R3G3B2 = 27,
    A8 = 28,
    A8R3G3B2 = 29,
    X4R4G4B4 = 30,
    A2B10G10R10 = 31,
    A8B8G8R8 = 32,
    X8B8G8R8 = 33,
    G16R16 = 34,
    A2R10G10B10 = 35,
    A16B16G16R16 = 36,
    A8P8 = 40,
    P8 = 41,
    L8 = 50,
    A8L8 = 51,
    A4L4 = 52,
    V8U8 = 60,
    L6V5U5 = 61,
    X8L8V8U8 = 62,
    Q8W8V8U8 = 63,
    V16U16 = 64,
    A2W10V10U10 = 67,
    UYVY = 1498831189,
    R8G8_B8G8 = 1195525970,
    YUY2 = 844715353,
    G8R8_G8B8 = 1111970375,
    DXT1 = 827611204,
    DXT2 = 844388420,
    DXT3 = 861165636,
    DXT4 = 877942852,
    DXT5 = 894720068,
    D16_LOCKABLE = 70,
    D32 = 71,
    D15S1 = 73,
    D24S8 = 75,
    D24X8 = 77,
    D24X4S4 = 79,
    D16 = 80,
    D32F_LOCKABLE = 82,
    D24FS8 = 83,
    D32_LOCKABLE = 84,
    S8_LOCKABLE = 85,
    L16 = 81,
    VERTEXDATA = 100,
    INDEX16 = 101,
    INDEX32 = 102,
    Q16W16V16U16 = 110,
    MULTI2_ARGB8 = 827606349,
    R16F = 111,
    G16R16F = 112,
    A16B16G16R16F = 113,
    R32F = 114,
    G32R32F = 115,
    A32B32G32R32F = 116,
    CxV8U8 = 117,
    A1 = 118,
    A2B10G10R10_XR_BIAS = 119,
    BINARYBUFFER = 199,
    FORCE_DWORD = 2147483647,
};
pub const D3DFMT_UNKNOWN = D3DFORMAT.UNKNOWN;
pub const D3DFMT_R8G8B8 = D3DFORMAT.R8G8B8;
pub const D3DFMT_A8R8G8B8 = D3DFORMAT.A8R8G8B8;
pub const D3DFMT_X8R8G8B8 = D3DFORMAT.X8R8G8B8;
pub const D3DFMT_R5G6B5 = D3DFORMAT.R5G6B5;
pub const D3DFMT_X1R5G5B5 = D3DFORMAT.X1R5G5B5;
pub const D3DFMT_A1R5G5B5 = D3DFORMAT.A1R5G5B5;
pub const D3DFMT_A4R4G4B4 = D3DFORMAT.A4R4G4B4;
pub const D3DFMT_R3G3B2 = D3DFORMAT.R3G3B2;
pub const D3DFMT_A8 = D3DFORMAT.A8;
pub const D3DFMT_A8R3G3B2 = D3DFORMAT.A8R3G3B2;
pub const D3DFMT_X4R4G4B4 = D3DFORMAT.X4R4G4B4;
pub const D3DFMT_A2B10G10R10 = D3DFORMAT.A2B10G10R10;
pub const D3DFMT_A8B8G8R8 = D3DFORMAT.A8B8G8R8;
pub const D3DFMT_X8B8G8R8 = D3DFORMAT.X8B8G8R8;
pub const D3DFMT_G16R16 = D3DFORMAT.G16R16;
pub const D3DFMT_A2R10G10B10 = D3DFORMAT.A2R10G10B10;
pub const D3DFMT_A16B16G16R16 = D3DFORMAT.A16B16G16R16;
pub const D3DFMT_A8P8 = D3DFORMAT.A8P8;
pub const D3DFMT_P8 = D3DFORMAT.P8;
pub const D3DFMT_L8 = D3DFORMAT.L8;
pub const D3DFMT_A8L8 = D3DFORMAT.A8L8;
pub const D3DFMT_A4L4 = D3DFORMAT.A4L4;
pub const D3DFMT_V8U8 = D3DFORMAT.V8U8;
pub const D3DFMT_L6V5U5 = D3DFORMAT.L6V5U5;
pub const D3DFMT_X8L8V8U8 = D3DFORMAT.X8L8V8U8;
pub const D3DFMT_Q8W8V8U8 = D3DFORMAT.Q8W8V8U8;
pub const D3DFMT_V16U16 = D3DFORMAT.V16U16;
pub const D3DFMT_A2W10V10U10 = D3DFORMAT.A2W10V10U10;
pub const D3DFMT_UYVY = D3DFORMAT.UYVY;
pub const D3DFMT_R8G8_B8G8 = D3DFORMAT.R8G8_B8G8;
pub const D3DFMT_YUY2 = D3DFORMAT.YUY2;
pub const D3DFMT_G8R8_G8B8 = D3DFORMAT.G8R8_G8B8;
pub const D3DFMT_DXT1 = D3DFORMAT.DXT1;
pub const D3DFMT_DXT2 = D3DFORMAT.DXT2;
pub const D3DFMT_DXT3 = D3DFORMAT.DXT3;
pub const D3DFMT_DXT4 = D3DFORMAT.DXT4;
pub const D3DFMT_DXT5 = D3DFORMAT.DXT5;
pub const D3DFMT_D16_LOCKABLE = D3DFORMAT.D16_LOCKABLE;
pub const D3DFMT_D32 = D3DFORMAT.D32;
pub const D3DFMT_D15S1 = D3DFORMAT.D15S1;
pub const D3DFMT_D24S8 = D3DFORMAT.D24S8;
pub const D3DFMT_D24X8 = D3DFORMAT.D24X8;
pub const D3DFMT_D24X4S4 = D3DFORMAT.D24X4S4;
pub const D3DFMT_D16 = D3DFORMAT.D16;
pub const D3DFMT_D32F_LOCKABLE = D3DFORMAT.D32F_LOCKABLE;
pub const D3DFMT_D24FS8 = D3DFORMAT.D24FS8;
pub const D3DFMT_D32_LOCKABLE = D3DFORMAT.D32_LOCKABLE;
pub const D3DFMT_S8_LOCKABLE = D3DFORMAT.S8_LOCKABLE;
pub const D3DFMT_L16 = D3DFORMAT.L16;
pub const D3DFMT_VERTEXDATA = D3DFORMAT.VERTEXDATA;
pub const D3DFMT_INDEX16 = D3DFORMAT.INDEX16;
pub const D3DFMT_INDEX32 = D3DFORMAT.INDEX32;
pub const D3DFMT_Q16W16V16U16 = D3DFORMAT.Q16W16V16U16;
pub const D3DFMT_MULTI2_ARGB8 = D3DFORMAT.MULTI2_ARGB8;
pub const D3DFMT_R16F = D3DFORMAT.R16F;
pub const D3DFMT_G16R16F = D3DFORMAT.G16R16F;
pub const D3DFMT_A16B16G16R16F = D3DFORMAT.A16B16G16R16F;
pub const D3DFMT_R32F = D3DFORMAT.R32F;
pub const D3DFMT_G32R32F = D3DFORMAT.G32R32F;
pub const D3DFMT_A32B32G32R32F = D3DFORMAT.A32B32G32R32F;
pub const D3DFMT_CxV8U8 = D3DFORMAT.CxV8U8;
pub const D3DFMT_A1 = D3DFORMAT.A1;
pub const D3DFMT_A2B10G10R10_XR_BIAS = D3DFORMAT.A2B10G10R10_XR_BIAS;
pub const D3DFMT_BINARYBUFFER = D3DFORMAT.BINARYBUFFER;
pub const D3DFMT_FORCE_DWORD = D3DFORMAT.FORCE_DWORD;

pub const D3DDISPLAYMODE = extern struct {
    Width: u32,
    Height: u32,
    RefreshRate: u32,
    Format: D3DFORMAT,
};

pub const D3DDEVICE_CREATION_PARAMETERS = extern struct {
    AdapterOrdinal: u32,
    DeviceType: D3DDEVTYPE,
    hFocusWindow: ?HWND,
    BehaviorFlags: u32,
};

pub const D3DSWAPEFFECT = enum(u32) {
    DISCARD = 1,
    FLIP = 2,
    COPY = 3,
    OVERLAY = 4,
    FLIPEX = 5,
    FORCE_DWORD = 2147483647,
};
pub const D3DSWAPEFFECT_DISCARD = D3DSWAPEFFECT.DISCARD;
pub const D3DSWAPEFFECT_FLIP = D3DSWAPEFFECT.FLIP;
pub const D3DSWAPEFFECT_COPY = D3DSWAPEFFECT.COPY;
pub const D3DSWAPEFFECT_OVERLAY = D3DSWAPEFFECT.OVERLAY;
pub const D3DSWAPEFFECT_FLIPEX = D3DSWAPEFFECT.FLIPEX;
pub const D3DSWAPEFFECT_FORCE_DWORD = D3DSWAPEFFECT.FORCE_DWORD;

pub const D3DPOOL = enum(u32) {
    DEFAULT = 0,
    MANAGED = 1,
    SYSTEMMEM = 2,
    SCRATCH = 3,
    FORCE_DWORD = 2147483647,
};
pub const D3DPOOL_DEFAULT = D3DPOOL.DEFAULT;
pub const D3DPOOL_MANAGED = D3DPOOL.MANAGED;
pub const D3DPOOL_SYSTEMMEM = D3DPOOL.SYSTEMMEM;
pub const D3DPOOL_SCRATCH = D3DPOOL.SCRATCH;
pub const D3DPOOL_FORCE_DWORD = D3DPOOL.FORCE_DWORD;

pub const D3DPRESENT_PARAMETERS = extern struct {
    BackBufferWidth: u32,
    BackBufferHeight: u32,
    BackBufferFormat: D3DFORMAT,
    BackBufferCount: u32,
    MultiSampleType: D3DMULTISAMPLE_TYPE,
    MultiSampleQuality: u32,
    SwapEffect: D3DSWAPEFFECT,
    hDeviceWindow: ?HWND,
    Windowed: BOOL,
    EnableAutoDepthStencil: BOOL,
    AutoDepthStencilFormat: D3DFORMAT,
    Flags: u32,
    FullScreen_RefreshRateInHz: u32,
    PresentationInterval: u32,
};

pub const D3DGAMMARAMP = extern struct {
    red: [256]u16,
    green: [256]u16,
    blue: [256]u16,
};

pub const D3DBACKBUFFER_TYPE = enum(u32) {
    MONO = 0,
    LEFT = 1,
    RIGHT = 2,
    FORCE_DWORD = 2147483647,
};
pub const D3DBACKBUFFER_TYPE_MONO = D3DBACKBUFFER_TYPE.MONO;
pub const D3DBACKBUFFER_TYPE_LEFT = D3DBACKBUFFER_TYPE.LEFT;
pub const D3DBACKBUFFER_TYPE_RIGHT = D3DBACKBUFFER_TYPE.RIGHT;
pub const D3DBACKBUFFER_TYPE_FORCE_DWORD = D3DBACKBUFFER_TYPE.FORCE_DWORD;

pub const D3DRESOURCETYPE = enum(i32) {
    SURFACE = 1,
    VOLUME = 2,
    TEXTURE = 3,
    VOLUMETEXTURE = 4,
    CUBETEXTURE = 5,
    VERTEXBUFFER = 6,
    INDEXBUFFER = 7,
    FORCE_DWORD = 2147483647,
};
pub const D3DRTYPE_SURFACE = D3DRESOURCETYPE.SURFACE;
pub const D3DRTYPE_VOLUME = D3DRESOURCETYPE.VOLUME;
pub const D3DRTYPE_TEXTURE = D3DRESOURCETYPE.TEXTURE;
pub const D3DRTYPE_VOLUMETEXTURE = D3DRESOURCETYPE.VOLUMETEXTURE;
pub const D3DRTYPE_CUBETEXTURE = D3DRESOURCETYPE.CUBETEXTURE;
pub const D3DRTYPE_VERTEXBUFFER = D3DRESOURCETYPE.VERTEXBUFFER;
pub const D3DRTYPE_INDEXBUFFER = D3DRESOURCETYPE.INDEXBUFFER;
pub const D3DRTYPE_FORCE_DWORD = D3DRESOURCETYPE.FORCE_DWORD;

pub const D3DCUBEMAP_FACES = enum(i32) {
    POSITIVE_X = 0,
    NEGATIVE_X = 1,
    POSITIVE_Y = 2,
    NEGATIVE_Y = 3,
    POSITIVE_Z = 4,
    NEGATIVE_Z = 5,
    FORCE_DWORD = 2147483647,
};
pub const D3DCUBEMAP_FACE_POSITIVE_X = D3DCUBEMAP_FACES.POSITIVE_X;
pub const D3DCUBEMAP_FACE_NEGATIVE_X = D3DCUBEMAP_FACES.NEGATIVE_X;
pub const D3DCUBEMAP_FACE_POSITIVE_Y = D3DCUBEMAP_FACES.POSITIVE_Y;
pub const D3DCUBEMAP_FACE_NEGATIVE_Y = D3DCUBEMAP_FACES.NEGATIVE_Y;
pub const D3DCUBEMAP_FACE_POSITIVE_Z = D3DCUBEMAP_FACES.POSITIVE_Z;
pub const D3DCUBEMAP_FACE_NEGATIVE_Z = D3DCUBEMAP_FACES.NEGATIVE_Z;
pub const D3DCUBEMAP_FACE_FORCE_DWORD = D3DCUBEMAP_FACES.FORCE_DWORD;

pub const D3DVERTEXBUFFER_DESC = extern struct {
    Format: D3DFORMAT,
    Type: D3DRESOURCETYPE,
    Usage: u32,
    Pool: D3DPOOL,
    Size: u32,
    FVF: u32,
};

pub const D3DINDEXBUFFER_DESC = extern struct {
    Format: D3DFORMAT,
    Type: D3DRESOURCETYPE,
    Usage: u32,
    Pool: D3DPOOL,
    Size: u32,
};

pub const D3DSURFACE_DESC = extern struct {
    Format: D3DFORMAT,
    Type: D3DRESOURCETYPE,
    Usage: u32,
    Pool: D3DPOOL,
    MultiSampleType: D3DMULTISAMPLE_TYPE,
    MultiSampleQuality: u32,
    Width: u32,
    Height: u32,
};

pub const D3DVOLUME_DESC = extern struct {
    Format: D3DFORMAT,
    Type: D3DRESOURCETYPE,
    Usage: u32,
    Pool: D3DPOOL,
    Width: u32,
    Height: u32,
    Depth: u32,
};

pub const D3DLOCKED_RECT = extern struct {
    Pitch: i32,
    pBits: ?*anyopaque,
};

pub const D3DBOX = extern struct {
    Left: u32,
    Top: u32,
    Right: u32,
    Bottom: u32,
    Front: u32,
    Back: u32,
};

pub const D3DLOCKED_BOX = extern struct {
    RowPitch: i32,
    SlicePitch: i32,
    pBits: ?*anyopaque,
};

pub const D3DRANGE = extern struct {
    Offset: u32,
    Size: u32,
};

pub const D3DRECTPATCH_INFO = extern struct {
    StartVertexOffsetWidth: u32,
    StartVertexOffsetHeight: u32,
    Width: u32,
    Height: u32,
    Stride: u32,
    Basis: D3DBASISTYPE,
    Degree: D3DDEGREETYPE,
};

pub const D3DTRIPATCH_INFO = extern struct {
    StartVertexOffset: u32,
    NumVertices: u32,
    Basis: D3DBASISTYPE,
    Degree: D3DDEGREETYPE,
};

pub const D3DRASTER_STATUS = extern struct {
    InVBlank: BOOL,
    ScanLine: u32,
};

pub const D3DDEBUGMONITORTOKENS = enum(i32) {
    ENABLE = 0,
    DISABLE = 1,
    FORCE_DWORD = 2147483647,
};
pub const D3DDMT_ENABLE = D3DDEBUGMONITORTOKENS.ENABLE;
pub const D3DDMT_DISABLE = D3DDEBUGMONITORTOKENS.DISABLE;
pub const D3DDMT_FORCE_DWORD = D3DDEBUGMONITORTOKENS.FORCE_DWORD;

pub const D3DQUERYTYPE = enum(i32) {
    VCACHE = 4,
    RESOURCEMANAGER = 5,
    VERTEXSTATS = 6,
    EVENT = 8,
    OCCLUSION = 9,
    TIMESTAMP = 10,
    TIMESTAMPDISJOINT = 11,
    TIMESTAMPFREQ = 12,
    PIPELINETIMINGS = 13,
    INTERFACETIMINGS = 14,
    VERTEXTIMINGS = 15,
    PIXELTIMINGS = 16,
    BANDWIDTHTIMINGS = 17,
    CACHEUTILIZATION = 18,
    MEMORYPRESSURE = 19,
};
pub const D3DQUERYTYPE_VCACHE = D3DQUERYTYPE.VCACHE;
pub const D3DQUERYTYPE_RESOURCEMANAGER = D3DQUERYTYPE.RESOURCEMANAGER;
pub const D3DQUERYTYPE_VERTEXSTATS = D3DQUERYTYPE.VERTEXSTATS;
pub const D3DQUERYTYPE_EVENT = D3DQUERYTYPE.EVENT;
pub const D3DQUERYTYPE_OCCLUSION = D3DQUERYTYPE.OCCLUSION;
pub const D3DQUERYTYPE_TIMESTAMP = D3DQUERYTYPE.TIMESTAMP;
pub const D3DQUERYTYPE_TIMESTAMPDISJOINT = D3DQUERYTYPE.TIMESTAMPDISJOINT;
pub const D3DQUERYTYPE_TIMESTAMPFREQ = D3DQUERYTYPE.TIMESTAMPFREQ;
pub const D3DQUERYTYPE_PIPELINETIMINGS = D3DQUERYTYPE.PIPELINETIMINGS;
pub const D3DQUERYTYPE_INTERFACETIMINGS = D3DQUERYTYPE.INTERFACETIMINGS;
pub const D3DQUERYTYPE_VERTEXTIMINGS = D3DQUERYTYPE.VERTEXTIMINGS;
pub const D3DQUERYTYPE_PIXELTIMINGS = D3DQUERYTYPE.PIXELTIMINGS;
pub const D3DQUERYTYPE_BANDWIDTHTIMINGS = D3DQUERYTYPE.BANDWIDTHTIMINGS;
pub const D3DQUERYTYPE_CACHEUTILIZATION = D3DQUERYTYPE.CACHEUTILIZATION;
pub const D3DQUERYTYPE_MEMORYPRESSURE = D3DQUERYTYPE.MEMORYPRESSURE;

pub const D3DRESOURCESTATS = extern struct {
    bThrashing: BOOL,
    ApproxBytesDownloaded: u32,
    NumEvicts: u32,
    NumVidCreates: u32,
    LastPri: u32,
    NumUsed: u32,
    NumUsedInVidMem: u32,
    WorkingSet: u32,
    WorkingSetBytes: u32,
    TotalManaged: u32,
    TotalBytes: u32,
};

pub const D3DDEVINFO_RESOURCEMANAGER = extern struct {
    stats: [8]D3DRESOURCESTATS,
};

pub const D3DDEVINFO_D3DVERTEXSTATS = extern struct {
    NumRenderedTriangles: u32,
    NumExtraClippingTriangles: u32,
};

pub const D3DDEVINFO_VCACHE = extern struct {
    Pattern: u32,
    OptMethod: u32,
    CacheSize: u32,
    MagicNumber: u32,
};

pub const D3DDEVINFO_D3D9PIPELINETIMINGS = extern struct {
    VertexProcessingTimePercent: f32,
    PixelProcessingTimePercent: f32,
    OtherGPUProcessingTimePercent: f32,
    GPUIdleTimePercent: f32,
};

pub const D3DDEVINFO_D3D9INTERFACETIMINGS = extern struct {
    WaitingForGPUToUseApplicationResourceTimePercent: f32,
    WaitingForGPUToAcceptMoreCommandsTimePercent: f32,
    WaitingForGPUToStayWithinLatencyTimePercent: f32,
    WaitingForGPUExclusiveResourceTimePercent: f32,
    WaitingForGPUOtherTimePercent: f32,
};

pub const D3DDEVINFO_D3D9STAGETIMINGS = extern struct {
    MemoryProcessingPercent: f32,
    ComputationProcessingPercent: f32,
};

pub const D3DDEVINFO_D3D9BANDWIDTHTIMINGS = extern struct {
    MaxBandwidthUtilized: f32,
    FrontEndUploadMemoryUtilizedPercent: f32,
    VertexRateUtilizedPercent: f32,
    TriangleSetupRateUtilizedPercent: f32,
    FillRateUtilizedPercent: f32,
};

pub const D3DDEVINFO_D3D9CACHEUTILIZATION = extern struct {
    TextureCacheHitRate: f32,
    PostTransformVertexCacheHitRate: f32,
};

pub const D3DCOMPOSERECTSOP = enum(i32) {
    COPY = 1,
    OR = 2,
    AND = 3,
    NEG = 4,
    FORCE_DWORD = 2147483647,
};
pub const D3DCOMPOSERECTS_COPY = D3DCOMPOSERECTSOP.COPY;
pub const D3DCOMPOSERECTS_OR = D3DCOMPOSERECTSOP.OR;
pub const D3DCOMPOSERECTS_AND = D3DCOMPOSERECTSOP.AND;
pub const D3DCOMPOSERECTS_NEG = D3DCOMPOSERECTSOP.NEG;
pub const D3DCOMPOSERECTS_FORCE_DWORD = D3DCOMPOSERECTSOP.FORCE_DWORD;

pub const D3DCOMPOSERECTDESC = extern struct {
    X: u16,
    Y: u16,
    Width: u16,
    Height: u16,
};

pub const D3DCOMPOSERECTDESTINATION = extern struct {
    SrcRectIndex: u16,
    Reserved: u16,
    X: i16,
    Y: i16,
};

pub const D3DSCANLINEORDERING = enum(i32) {
    UNKNOWN = 0,
    PROGRESSIVE = 1,
    INTERLACED = 2,
};
pub const D3DSCANLINEORDERING_UNKNOWN = D3DSCANLINEORDERING.UNKNOWN;
pub const D3DSCANLINEORDERING_PROGRESSIVE = D3DSCANLINEORDERING.PROGRESSIVE;
pub const D3DSCANLINEORDERING_INTERLACED = D3DSCANLINEORDERING.INTERLACED;

pub const D3DDISPLAYMODEEX = extern struct {
    Size: u32,
    Width: u32,
    Height: u32,
    RefreshRate: u32,
    Format: D3DFORMAT,
    ScanLineOrdering: D3DSCANLINEORDERING,
};

pub const D3DDISPLAYMODEFILTER = extern struct {
    Size: u32,
    Format: D3DFORMAT,
    ScanLineOrdering: D3DSCANLINEORDERING,
};

pub const D3DDISPLAYROTATION = enum(i32) {
    IDENTITY = 1,
    @"90" = 2,
    @"180" = 3,
    @"270" = 4,
};
pub const D3DDISPLAYROTATION_IDENTITY = D3DDISPLAYROTATION.IDENTITY;
pub const D3DDISPLAYROTATION_90 = D3DDISPLAYROTATION.@"90";
pub const D3DDISPLAYROTATION_180 = D3DDISPLAYROTATION.@"180";
pub const D3DDISPLAYROTATION_270 = D3DDISPLAYROTATION.@"270";

pub const D3D_OMAC = extern struct {
    Omac: [16]u8,
};

pub const D3DAUTHENTICATEDCHANNELTYPE = enum(i32) {
    @"3D9" = 1,
    RIVER_SOFTWARE = 2,
    RIVER_HARDWARE = 3,
};
pub const D3DAUTHENTICATEDCHANNEL_D3D9 = D3DAUTHENTICATEDCHANNELTYPE.@"3D9";
pub const D3DAUTHENTICATEDCHANNEL_DRIVER_SOFTWARE = D3DAUTHENTICATEDCHANNELTYPE.RIVER_SOFTWARE;
pub const D3DAUTHENTICATEDCHANNEL_DRIVER_HARDWARE = D3DAUTHENTICATEDCHANNELTYPE.RIVER_HARDWARE;

pub const D3DAUTHENTICATEDCHANNEL_QUERY_INPUT = extern struct {
    QueryType: Guid,
    hChannel: ?HANDLE,
    SequenceNumber: u32,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT = extern struct {
    omac: D3D_OMAC,
    QueryType: Guid,
    hChannel: ?HANDLE,
    SequenceNumber: u32,
    ReturnCode: HRESULT,
};

pub const D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS = extern struct {
    Anonymous: extern union {
        Anonymous: extern struct {
            _bitfield: u32,
        },
        Value: u32,
    },
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYPROTECTION_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    ProtectionFlags: D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYCHANNELTYPE_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    ChannelType: D3DAUTHENTICATEDCHANNELTYPE,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYDEVICEHANDLE_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    DeviceHandle: ?HANDLE,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_INPUT = extern struct {
    Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT,
    DXVA2DecodeHandle: ?HANDLE,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    DXVA2DecodeHandle: ?HANDLE,
    CryptoSessionHandle: ?HANDLE,
    DeviceHandle: ?HANDLE,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESSCOUNT_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    NumRestrictedSharedResourceProcesses: u32,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_INPUT = extern struct {
    Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT,
    ProcessIndex: u32,
};

pub const D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE = enum(i32) {
    UNKNOWN = 0,
    DWM = 1,
    HANDLE = 2,
};
pub const PROCESSIDTYPE_UNKNOWN = D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE.UNKNOWN;
pub const PROCESSIDTYPE_DWM = D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE.DWM;
pub const PROCESSIDTYPE_HANDLE = D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE.HANDLE;

pub const D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    ProcessIndex: u32,
    ProcessIdentifer: D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE,
    ProcessHandle: ?HANDLE,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    NumUnrestrictedProtectedSharedResources: u32,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_INPUT = extern struct {
    Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT,
    DeviceHandle: ?HANDLE,
    CryptoSessionHandle: ?HANDLE,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    DeviceHandle: ?HANDLE,
    CryptoSessionHandle: ?HANDLE,
    NumOutputIDs: u32,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_INPUT = extern struct {
    Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT,
    DeviceHandle: ?HANDLE,
    CryptoSessionHandle: ?HANDLE,
    OutputIDIndex: u32,
};

pub const D3DBUSTYPE = enum(i32) {
    TYPE_OTHER = 0,
    TYPE_PCI = 1,
    TYPE_PCIX = 2,
    TYPE_PCIEXPRESS = 3,
    TYPE_AGP = 4,
    IMPL_MODIFIER_INSIDE_OF_CHIPSET = 65536,
    IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP = 131072,
    IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET = 196608,
    IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR = 262144,
    IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE = 327680,
    IMPL_MODIFIER_NON_STANDARD = -2147483648,
};
pub const D3DBUSTYPE_OTHER = D3DBUSTYPE.TYPE_OTHER;
pub const D3DBUSTYPE_PCI = D3DBUSTYPE.TYPE_PCI;
pub const D3DBUSTYPE_PCIX = D3DBUSTYPE.TYPE_PCIX;
pub const D3DBUSTYPE_PCIEXPRESS = D3DBUSTYPE.TYPE_PCIEXPRESS;
pub const D3DBUSTYPE_AGP = D3DBUSTYPE.TYPE_AGP;
pub const D3DBUSIMPL_MODIFIER_INSIDE_OF_CHIPSET = D3DBUSTYPE.IMPL_MODIFIER_INSIDE_OF_CHIPSET;
pub const D3DBUSIMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP = D3DBUSTYPE.IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP;
pub const D3DBUSIMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET = D3DBUSTYPE.IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET;
pub const D3DBUSIMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR = D3DBUSTYPE.IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR;
pub const D3DBUSIMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE = D3DBUSTYPE.IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE;
pub const D3DBUSIMPL_MODIFIER_NON_STANDARD = D3DBUSTYPE.IMPL_MODIFIER_NON_STANDARD;

pub const D3DAUTHENTICATEDCHANNEL_QUERYINFOBUSTYPE_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    BusType: D3DBUSTYPE,
    bAccessibleInContiguousBlocks: BOOL,
    bAccessibleInNonContiguousBlocks: BOOL,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUIDCOUNT_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    NumEncryptionGuids: u32,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_INPUT = extern struct {
    Input: D3DAUTHENTICATEDCHANNEL_QUERY_INPUT,
    EncryptionGuidIndex: u32,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    EncryptionGuidIndex: u32,
    EncryptionGuid: Guid,
};

pub const D3DAUTHENTICATEDCHANNEL_QUERYUNCOMPRESSEDENCRYPTIONLEVEL_OUTPUT = extern struct {
    Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
    EncryptionGuid: Guid,
};

pub const D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT = extern struct {
    omac: D3D_OMAC,
    ConfigureType: Guid,
    hChannel: ?HANDLE,
    SequenceNumber: u32,
};

pub const D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT = extern struct {
    omac: D3D_OMAC,
    ConfigureType: Guid,
    hChannel: ?HANDLE,
    SequenceNumber: u32,
    ReturnCode: HRESULT,
};

pub const D3DAUTHENTICATEDCHANNEL_CONFIGUREINITIALIZE = extern struct {
    Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT,
    StartSequenceQuery: u32,
    StartSequenceConfigure: u32,
};

pub const D3DAUTHENTICATEDCHANNEL_CONFIGUREPROTECTION = extern struct {
    Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT,
    Protections: D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS,
};

pub const D3DAUTHENTICATEDCHANNEL_CONFIGURECRYPTOSESSION = extern struct {
    Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT,
    DXVA2DecodeHandle: ?HANDLE,
    CryptoSessionHandle: ?HANDLE,
    DeviceHandle: ?HANDLE,
};

pub const D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE = extern struct {
    Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT,
    ProcessIdentiferType: D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE,
    ProcessHandle: ?HANDLE,
    AllowAccess: BOOL,
};

pub const D3DAUTHENTICATEDCHANNEL_CONFIGUREUNCOMPRESSEDENCRYPTION = extern struct {
    Parameters: D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT,
    EncryptionGuid: Guid,
};

pub const D3DENCRYPTED_BLOCK_INFO = extern struct {
    NumEncryptedBytesAtBeginning: u32,
    NumBytesInSkipPattern: u32,
    NumBytesInEncryptPattern: u32,
};

pub const D3DVSHADERCAPS2_0 = extern struct {
    Caps: u32,
    DynamicFlowControlDepth: i32,
    NumTemps: i32,
    StaticFlowControlDepth: i32,
};

pub const D3DPSHADERCAPS2_0 = extern struct {
    Caps: u32,
    DynamicFlowControlDepth: i32,
    NumTemps: i32,
    StaticFlowControlDepth: i32,
    NumInstructionSlots: i32,
};

pub const D3DCAPS9 = extern struct {
    DeviceType: D3DDEVTYPE,
    AdapterOrdinal: u32,
    Caps: u32,
    Caps2: u32,
    Caps3: u32,
    PresentationIntervals: u32,
    CursorCaps: u32,
    DevCaps: u32,
    PrimitiveMiscCaps: u32,
    RasterCaps: u32,
    ZCmpCaps: u32,
    SrcBlendCaps: u32,
    DestBlendCaps: u32,
    AlphaCmpCaps: u32,
    ShadeCaps: u32,
    TextureCaps: u32,
    TextureFilterCaps: u32,
    CubeTextureFilterCaps: u32,
    VolumeTextureFilterCaps: u32,
    TextureAddressCaps: u32,
    VolumeTextureAddressCaps: u32,
    LineCaps: u32,
    MaxTextureWidth: u32,
    MaxTextureHeight: u32,
    MaxVolumeExtent: u32,
    MaxTextureRepeat: u32,
    MaxTextureAspectRatio: u32,
    MaxAnisotropy: u32,
    MaxVertexW: f32,
    GuardBandLeft: f32,
    GuardBandTop: f32,
    GuardBandRight: f32,
    GuardBandBottom: f32,
    ExtentsAdjust: f32,
    StencilCaps: u32,
    FVFCaps: u32,
    TextureOpCaps: u32,
    MaxTextureBlendStages: u32,
    MaxSimultaneousTextures: u32,
    VertexProcessingCaps: u32,
    MaxActiveLights: u32,
    MaxUserClipPlanes: u32,
    MaxVertexBlendMatrices: u32,
    MaxVertexBlendMatrixIndex: u32,
    MaxPointSize: f32,
    MaxPrimitiveCount: u32,
    MaxVertexIndex: u32,
    MaxStreams: u32,
    MaxStreamStride: u32,
    VertexShaderVersion: u32,
    MaxVertexShaderConst: u32,
    PixelShaderVersion: u32,
    PixelShader1xMaxValue: f32,
    DevCaps2: u32,
    MaxNpatchTessellationLevel: f32,
    Reserved5: u32,
    MasterAdapterOrdinal: u32,
    AdapterOrdinalInGroup: u32,
    NumberOfAdaptersInGroup: u32,
    DeclTypes: u32,
    NumSimultaneousRTs: u32,
    StretchRectFilterCaps: u32,
    VS20Caps: D3DVSHADERCAPS2_0,
    PS20Caps: D3DPSHADERCAPS2_0,
    VertexTextureFilterCaps: u32,
    MaxVShaderInstructionsExecuted: u32,
    MaxPShaderInstructionsExecuted: u32,
    MaxVertexShader30InstructionSlots: u32,
    MaxPixelShader30InstructionSlots: u32,
};

const IID_IDirect3D9_Value = Guid.initString("81bdcbca-64d4-426d-ae8d-ad0147f4275c");
pub const IID_IDirect3D9 = &IID_IDirect3D9_Value;
pub const IDirect3D9 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        RegisterSoftwareDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                pInitializeFunction: ?*anyopaque,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                pInitializeFunction: ?*anyopaque,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetAdapterCount: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3D9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        GetAdapterIdentifier: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                Flags: u32,
                pIdentifier: ?*D3DADAPTER_IDENTIFIER9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                Flags: u32,
                pIdentifier: ?*D3DADAPTER_IDENTIFIER9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetAdapterModeCount: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                Format: D3DFORMAT,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                Format: D3DFORMAT,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        EnumAdapterModes: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                Format: D3DFORMAT,
                Mode: u32,
                pMode: ?*D3DDISPLAYMODE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                Format: D3DFORMAT,
                Mode: u32,
                pMode: ?*D3DDISPLAYMODE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetAdapterDisplayMode: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                pMode: ?*D3DDISPLAYMODE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                pMode: ?*D3DDISPLAYMODE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CheckDeviceType: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DevType: D3DDEVTYPE,
                AdapterFormat: D3DFORMAT,
                BackBufferFormat: D3DFORMAT,
                bWindowed: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DevType: D3DDEVTYPE,
                AdapterFormat: D3DFORMAT,
                BackBufferFormat: D3DFORMAT,
                bWindowed: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CheckDeviceFormat: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                AdapterFormat: D3DFORMAT,
                Usage: u32,
                RType: D3DRESOURCETYPE,
                CheckFormat: D3DFORMAT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                AdapterFormat: D3DFORMAT,
                Usage: u32,
                RType: D3DRESOURCETYPE,
                CheckFormat: D3DFORMAT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CheckDeviceMultiSampleType: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                SurfaceFormat: D3DFORMAT,
                Windowed: BOOL,
                MultiSampleType: D3DMULTISAMPLE_TYPE,
                pQualityLevels: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                SurfaceFormat: D3DFORMAT,
                Windowed: BOOL,
                MultiSampleType: D3DMULTISAMPLE_TYPE,
                pQualityLevels: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CheckDepthStencilMatch: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                AdapterFormat: D3DFORMAT,
                RenderTargetFormat: D3DFORMAT,
                DepthStencilFormat: D3DFORMAT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                AdapterFormat: D3DFORMAT,
                RenderTargetFormat: D3DFORMAT,
                DepthStencilFormat: D3DFORMAT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CheckDeviceFormatConversion: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                SourceFormat: D3DFORMAT,
                TargetFormat: D3DFORMAT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                SourceFormat: D3DFORMAT,
                TargetFormat: D3DFORMAT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDeviceCaps: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                pCaps: ?*D3DCAPS9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                pCaps: ?*D3DCAPS9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetAdapterMonitor: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
            ) callconv(@import("std").os.windows.WINAPI) ?HMONITOR,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
            ) callconv(@import("std").os.windows.WINAPI) ?HMONITOR,
        },
        CreateDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                hFocusWindow: ?HWND,
                BehaviorFlags: u32,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
                ppReturnedDeviceInterface: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                hFocusWindow: ?HWND,
                BehaviorFlags: u32,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
                ppReturnedDeviceInterface: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_RegisterSoftwareDevice(self: *const T, pInitializeFunction: ?*anyopaque) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).RegisterSoftwareDevice(@as(*const IDirect3D9, @ptrCast(self)), pInitializeFunction);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_GetAdapterCount(self: *const T) u32 {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).GetAdapterCount(@as(*const IDirect3D9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_GetAdapterIdentifier(self: *const T, Adapter: u32, Flags: u32, pIdentifier: ?*D3DADAPTER_IDENTIFIER9) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).GetAdapterIdentifier(@as(*const IDirect3D9, @ptrCast(self)), Adapter, Flags, pIdentifier);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_GetAdapterModeCount(self: *const T, Adapter: u32, Format: D3DFORMAT) u32 {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).GetAdapterModeCount(@as(*const IDirect3D9, @ptrCast(self)), Adapter, Format);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_EnumAdapterModes(self: *const T, Adapter: u32, Format: D3DFORMAT, Mode: u32, pMode: ?*D3DDISPLAYMODE) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).EnumAdapterModes(@as(*const IDirect3D9, @ptrCast(self)), Adapter, Format, Mode, pMode);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_GetAdapterDisplayMode(self: *const T, Adapter: u32, pMode: ?*D3DDISPLAYMODE) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).GetAdapterDisplayMode(@as(*const IDirect3D9, @ptrCast(self)), Adapter, pMode);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_CheckDeviceType(self: *const T, Adapter: u32, DevType: D3DDEVTYPE, AdapterFormat: D3DFORMAT, BackBufferFormat: D3DFORMAT, bWindowed: BOOL) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).CheckDeviceType(@as(*const IDirect3D9, @ptrCast(self)), Adapter, DevType, AdapterFormat, BackBufferFormat, bWindowed);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_CheckDeviceFormat(self: *const T, Adapter: u32, DeviceType: D3DDEVTYPE, AdapterFormat: D3DFORMAT, Usage: u32, RType: D3DRESOURCETYPE, CheckFormat: D3DFORMAT) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).CheckDeviceFormat(@as(*const IDirect3D9, @ptrCast(self)), Adapter, DeviceType, AdapterFormat, Usage, RType, CheckFormat);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_CheckDeviceMultiSampleType(self: *const T, Adapter: u32, DeviceType: D3DDEVTYPE, SurfaceFormat: D3DFORMAT, Windowed: BOOL, MultiSampleType: D3DMULTISAMPLE_TYPE, pQualityLevels: ?*u32) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).CheckDeviceMultiSampleType(@as(*const IDirect3D9, @ptrCast(self)), Adapter, DeviceType, SurfaceFormat, Windowed, MultiSampleType, pQualityLevels);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_CheckDepthStencilMatch(self: *const T, Adapter: u32, DeviceType: D3DDEVTYPE, AdapterFormat: D3DFORMAT, RenderTargetFormat: D3DFORMAT, DepthStencilFormat: D3DFORMAT) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).CheckDepthStencilMatch(@as(*const IDirect3D9, @ptrCast(self)), Adapter, DeviceType, AdapterFormat, RenderTargetFormat, DepthStencilFormat);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_CheckDeviceFormatConversion(self: *const T, Adapter: u32, DeviceType: D3DDEVTYPE, SourceFormat: D3DFORMAT, TargetFormat: D3DFORMAT) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).CheckDeviceFormatConversion(@as(*const IDirect3D9, @ptrCast(self)), Adapter, DeviceType, SourceFormat, TargetFormat);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_GetDeviceCaps(self: *const T, Adapter: u32, DeviceType: D3DDEVTYPE, pCaps: ?*D3DCAPS9) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).GetDeviceCaps(@as(*const IDirect3D9, @ptrCast(self)), Adapter, DeviceType, pCaps);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_GetAdapterMonitor(self: *const T, Adapter: u32) ?HMONITOR {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).GetAdapterMonitor(@as(*const IDirect3D9, @ptrCast(self)), Adapter);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9_CreateDevice(self: *const T, Adapter: u32, DeviceType: D3DDEVTYPE, hFocusWindow: ?HWND, BehaviorFlags: u32, pPresentationParameters: ?*D3DPRESENT_PARAMETERS, ppReturnedDeviceInterface: ?*?*IDirect3DDevice9) HRESULT {
                return @as(*const IDirect3D9.VTable, @ptrCast(self.vtable)).CreateDevice(@as(*const IDirect3D9, @ptrCast(self)), Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, ppReturnedDeviceInterface);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DDevice9_Value = Guid.initString("d0223b96-bf7a-43fd-92bd-a43b0d82b9eb");
pub const IID_IDirect3DDevice9 = &IID_IDirect3DDevice9_Value;
pub const IDirect3DDevice9 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        TestCooperativeLevel: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetAvailableTextureMem: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        EvictManagedResources: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDirect3D: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                ppD3D9: ?*?*IDirect3D9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                ppD3D9: ?*?*IDirect3D9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDeviceCaps: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pCaps: ?*D3DCAPS9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pCaps: ?*D3DCAPS9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDisplayMode: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                pMode: ?*D3DDISPLAYMODE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                pMode: ?*D3DDISPLAYMODE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetCreationParameters: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pParameters: ?*D3DDEVICE_CREATION_PARAMETERS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pParameters: ?*D3DDEVICE_CREATION_PARAMETERS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetCursorProperties: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                XHotSpot: u32,
                YHotSpot: u32,
                pCursorBitmap: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                XHotSpot: u32,
                YHotSpot: u32,
                pCursorBitmap: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetCursorPosition: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                X: i32,
                Y: i32,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) void,
            else => *const fn (
                self: *const IDirect3DDevice9,
                X: i32,
                Y: i32,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) void,
        },
        ShowCursor: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                bShow: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) BOOL,
            else => *const fn (
                self: *const IDirect3DDevice9,
                bShow: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) BOOL,
        },
        CreateAdditionalSwapChain: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
                pSwapChain: ?*?*IDirect3DSwapChain9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
                pSwapChain: ?*?*IDirect3DSwapChain9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetSwapChain: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                pSwapChain: ?*?*IDirect3DSwapChain9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                pSwapChain: ?*?*IDirect3DSwapChain9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetNumberOfSwapChains: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        Reset: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Present: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pSourceRect: ?*const RECT,
                pDestRect: ?*const RECT,
                hDestWindowOverride: ?HWND,
                pDirtyRegion: ?*const RGNDATA,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pSourceRect: ?*const RECT,
                pDestRect: ?*const RECT,
                hDestWindowOverride: ?HWND,
                pDirtyRegion: ?*const RGNDATA,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetBackBuffer: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                iBackBuffer: u32,
                Type: D3DBACKBUFFER_TYPE,
                ppBackBuffer: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                iBackBuffer: u32,
                Type: D3DBACKBUFFER_TYPE,
                ppBackBuffer: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetRasterStatus: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                pRasterStatus: ?*D3DRASTER_STATUS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                pRasterStatus: ?*D3DRASTER_STATUS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetDialogBoxMode: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                bEnableDialogs: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                bEnableDialogs: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetGammaRamp: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                Flags: u32,
                pRamp: ?*const D3DGAMMARAMP,
            ) callconv(@import("std").os.windows.WINAPI) void,
            else => *const fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                Flags: u32,
                pRamp: ?*const D3DGAMMARAMP,
            ) callconv(@import("std").os.windows.WINAPI) void,
        },
        GetGammaRamp: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                pRamp: ?*D3DGAMMARAMP,
            ) callconv(@import("std").os.windows.WINAPI) void,
            else => *const fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                pRamp: ?*D3DGAMMARAMP,
            ) callconv(@import("std").os.windows.WINAPI) void,
        },
        CreateTexture: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Width: u32,
                Height: u32,
                Levels: u32,
                Usage: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppTexture: ?*?*IDirect3DTexture9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Width: u32,
                Height: u32,
                Levels: u32,
                Usage: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppTexture: ?*?*IDirect3DTexture9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateVolumeTexture: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Width: u32,
                Height: u32,
                Depth: u32,
                Levels: u32,
                Usage: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppVolumeTexture: ?*?*IDirect3DVolumeTexture9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Width: u32,
                Height: u32,
                Depth: u32,
                Levels: u32,
                Usage: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppVolumeTexture: ?*?*IDirect3DVolumeTexture9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateCubeTexture: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                EdgeLength: u32,
                Levels: u32,
                Usage: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppCubeTexture: ?*?*IDirect3DCubeTexture9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                EdgeLength: u32,
                Levels: u32,
                Usage: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppCubeTexture: ?*?*IDirect3DCubeTexture9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateVertexBuffer: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Length: u32,
                Usage: u32,
                FVF: u32,
                Pool: D3DPOOL,
                ppVertexBuffer: ?*?*IDirect3DVertexBuffer9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Length: u32,
                Usage: u32,
                FVF: u32,
                Pool: D3DPOOL,
                ppVertexBuffer: ?*?*IDirect3DVertexBuffer9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateIndexBuffer: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Length: u32,
                Usage: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppIndexBuffer: ?*?*IDirect3DIndexBuffer9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Length: u32,
                Usage: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppIndexBuffer: ?*?*IDirect3DIndexBuffer9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateRenderTarget: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                MultiSample: D3DMULTISAMPLE_TYPE,
                MultisampleQuality: u32,
                Lockable: BOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                MultiSample: D3DMULTISAMPLE_TYPE,
                MultisampleQuality: u32,
                Lockable: BOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateDepthStencilSurface: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                MultiSample: D3DMULTISAMPLE_TYPE,
                MultisampleQuality: u32,
                Discard: BOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                MultiSample: D3DMULTISAMPLE_TYPE,
                MultisampleQuality: u32,
                Discard: BOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        UpdateSurface: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pSourceSurface: ?*IDirect3DSurface9,
                pSourceRect: ?*const RECT,
                pDestinationSurface: ?*IDirect3DSurface9,
                pDestPoint: ?*const POINT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pSourceSurface: ?*IDirect3DSurface9,
                pSourceRect: ?*const RECT,
                pDestinationSurface: ?*IDirect3DSurface9,
                pDestPoint: ?*const POINT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        UpdateTexture: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pSourceTexture: ?*IDirect3DBaseTexture9,
                pDestinationTexture: ?*IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pSourceTexture: ?*IDirect3DBaseTexture9,
                pDestinationTexture: ?*IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetRenderTargetData: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pRenderTarget: ?*IDirect3DSurface9,
                pDestSurface: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pRenderTarget: ?*IDirect3DSurface9,
                pDestSurface: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetFrontBufferData: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                pDestSurface: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                iSwapChain: u32,
                pDestSurface: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        StretchRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pSourceSurface: ?*IDirect3DSurface9,
                pSourceRect: ?*const RECT,
                pDestSurface: ?*IDirect3DSurface9,
                pDestRect: ?*const RECT,
                Filter: D3DTEXTUREFILTERTYPE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pSourceSurface: ?*IDirect3DSurface9,
                pSourceRect: ?*const RECT,
                pDestSurface: ?*IDirect3DSurface9,
                pDestRect: ?*const RECT,
                Filter: D3DTEXTUREFILTERTYPE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        ColorFill: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pSurface: ?*IDirect3DSurface9,
                pRect: ?*const RECT,
                color: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pSurface: ?*IDirect3DSurface9,
                pRect: ?*const RECT,
                color: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateOffscreenPlainSurface: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetRenderTarget: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                RenderTargetIndex: u32,
                pRenderTarget: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                RenderTargetIndex: u32,
                pRenderTarget: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetRenderTarget: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                RenderTargetIndex: u32,
                ppRenderTarget: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                RenderTargetIndex: u32,
                ppRenderTarget: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetDepthStencilSurface: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pNewZStencil: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pNewZStencil: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDepthStencilSurface: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                ppZStencilSurface: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                ppZStencilSurface: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        BeginScene: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        EndScene: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Clear: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Count: u32,
                pRects: ?*const D3DRECT,
                Flags: u32,
                Color: u32,
                Z: f32,
                Stencil: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Count: u32,
                pRects: ?*const D3DRECT,
                Flags: u32,
                Color: u32,
                Z: f32,
                Stencil: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetTransform: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                State: D3DTRANSFORMSTATETYPE,
                pMatrix: ?*const D3DMATRIX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                State: D3DTRANSFORMSTATETYPE,
                pMatrix: ?*const D3DMATRIX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetTransform: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                State: D3DTRANSFORMSTATETYPE,
                pMatrix: ?*D3DMATRIX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                State: D3DTRANSFORMSTATETYPE,
                pMatrix: ?*D3DMATRIX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        MultiplyTransform: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                param0: D3DTRANSFORMSTATETYPE,
                param1: ?*const D3DMATRIX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                param0: D3DTRANSFORMSTATETYPE,
                param1: ?*const D3DMATRIX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetViewport: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pViewport: ?*const D3DVIEWPORT9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pViewport: ?*const D3DVIEWPORT9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetViewport: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pViewport: ?*D3DVIEWPORT9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pViewport: ?*D3DVIEWPORT9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetMaterial: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pMaterial: ?*const D3DMATERIAL9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pMaterial: ?*const D3DMATERIAL9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetMaterial: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pMaterial: ?*D3DMATERIAL9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pMaterial: ?*D3DMATERIAL9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetLight: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                param1: ?*const D3DLIGHT9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                param1: ?*const D3DLIGHT9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetLight: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                param1: ?*D3DLIGHT9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                param1: ?*D3DLIGHT9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        LightEnable: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                Enable: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                Enable: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetLightEnable: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                pEnable: ?*BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                pEnable: ?*BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetClipPlane: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                pPlane: ?*const f32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                pPlane: ?*const f32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetClipPlane: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                pPlane: ?*f32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Index: u32,
                pPlane: ?*f32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetRenderState: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                State: D3DRENDERSTATETYPE,
                Value: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                State: D3DRENDERSTATETYPE,
                Value: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetRenderState: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                State: D3DRENDERSTATETYPE,
                pValue: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                State: D3DRENDERSTATETYPE,
                pValue: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateStateBlock: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Type: D3DSTATEBLOCKTYPE,
                ppSB: ?*?*IDirect3DStateBlock9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Type: D3DSTATEBLOCKTYPE,
                ppSB: ?*?*IDirect3DStateBlock9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        BeginStateBlock: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        EndStateBlock: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                ppSB: ?*?*IDirect3DStateBlock9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                ppSB: ?*?*IDirect3DStateBlock9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetClipStatus: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pClipStatus: ?*const D3DCLIPSTATUS9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pClipStatus: ?*const D3DCLIPSTATUS9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetClipStatus: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pClipStatus: ?*D3DCLIPSTATUS9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pClipStatus: ?*D3DCLIPSTATUS9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetTexture: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Stage: u32,
                ppTexture: ?*?*IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Stage: u32,
                ppTexture: ?*?*IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetTexture: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Stage: u32,
                pTexture: ?*IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Stage: u32,
                pTexture: ?*IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetTextureStageState: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Stage: u32,
                Type: D3DTEXTURESTAGESTATETYPE,
                pValue: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Stage: u32,
                Type: D3DTEXTURESTAGESTATETYPE,
                pValue: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetTextureStageState: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Stage: u32,
                Type: D3DTEXTURESTAGESTATETYPE,
                Value: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Stage: u32,
                Type: D3DTEXTURESTAGESTATETYPE,
                Value: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetSamplerState: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Sampler: u32,
                Type: D3DSAMPLERSTATETYPE,
                pValue: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Sampler: u32,
                Type: D3DSAMPLERSTATETYPE,
                pValue: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetSamplerState: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Sampler: u32,
                Type: D3DSAMPLERSTATETYPE,
                Value: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Sampler: u32,
                Type: D3DSAMPLERSTATETYPE,
                Value: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        ValidateDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pNumPasses: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pNumPasses: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetPaletteEntries: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                PaletteNumber: u32,
                pEntries: ?*const PALETTEENTRY,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                PaletteNumber: u32,
                pEntries: ?*const PALETTEENTRY,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetPaletteEntries: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                PaletteNumber: u32,
                pEntries: ?*PALETTEENTRY,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                PaletteNumber: u32,
                pEntries: ?*PALETTEENTRY,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetCurrentTexturePalette: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                PaletteNumber: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                PaletteNumber: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetCurrentTexturePalette: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                PaletteNumber: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                PaletteNumber: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetScissorRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pRect: ?*const RECT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pRect: ?*const RECT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetScissorRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pRect: ?*RECT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pRect: ?*RECT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetSoftwareVertexProcessing: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                bSoftware: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                bSoftware: BOOL,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetSoftwareVertexProcessing: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) BOOL,
            else => *const fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) BOOL,
        },
        SetNPatchMode: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                nSegments: f32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                nSegments: f32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetNPatchMode: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) f32,
            else => *const fn (
                self: *const IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) f32,
        },
        DrawPrimitive: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                PrimitiveType: D3DPRIMITIVETYPE,
                StartVertex: u32,
                PrimitiveCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                PrimitiveType: D3DPRIMITIVETYPE,
                StartVertex: u32,
                PrimitiveCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        DrawIndexedPrimitive: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                param0: D3DPRIMITIVETYPE,
                BaseVertexIndex: i32,
                MinVertexIndex: u32,
                NumVertices: u32,
                startIndex: u32,
                primCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                param0: D3DPRIMITIVETYPE,
                BaseVertexIndex: i32,
                MinVertexIndex: u32,
                NumVertices: u32,
                startIndex: u32,
                primCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        DrawPrimitiveUP: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                PrimitiveType: D3DPRIMITIVETYPE,
                PrimitiveCount: u32,
                pVertexStreamZeroData: ?*const anyopaque,
                VertexStreamZeroStride: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                PrimitiveType: D3DPRIMITIVETYPE,
                PrimitiveCount: u32,
                pVertexStreamZeroData: ?*const anyopaque,
                VertexStreamZeroStride: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        DrawIndexedPrimitiveUP: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                PrimitiveType: D3DPRIMITIVETYPE,
                MinVertexIndex: u32,
                NumVertices: u32,
                PrimitiveCount: u32,
                pIndexData: ?*const anyopaque,
                IndexDataFormat: D3DFORMAT,
                pVertexStreamZeroData: ?*const anyopaque,
                VertexStreamZeroStride: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                PrimitiveType: D3DPRIMITIVETYPE,
                MinVertexIndex: u32,
                NumVertices: u32,
                PrimitiveCount: u32,
                pIndexData: ?*const anyopaque,
                IndexDataFormat: D3DFORMAT,
                pVertexStreamZeroData: ?*const anyopaque,
                VertexStreamZeroStride: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        ProcessVertices: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                SrcStartIndex: u32,
                DestIndex: u32,
                VertexCount: u32,
                pDestBuffer: ?*IDirect3DVertexBuffer9,
                pVertexDecl: ?*IDirect3DVertexDeclaration9,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                SrcStartIndex: u32,
                DestIndex: u32,
                VertexCount: u32,
                pDestBuffer: ?*IDirect3DVertexBuffer9,
                pVertexDecl: ?*IDirect3DVertexDeclaration9,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateVertexDeclaration: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pVertexElements: ?*const D3DVERTEXELEMENT9,
                ppDecl: ?*?*IDirect3DVertexDeclaration9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pVertexElements: ?*const D3DVERTEXELEMENT9,
                ppDecl: ?*?*IDirect3DVertexDeclaration9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetVertexDeclaration: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pDecl: ?*IDirect3DVertexDeclaration9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pDecl: ?*IDirect3DVertexDeclaration9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetVertexDeclaration: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                ppDecl: ?*?*IDirect3DVertexDeclaration9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                ppDecl: ?*?*IDirect3DVertexDeclaration9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetFVF: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                FVF: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                FVF: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetFVF: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pFVF: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pFVF: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateVertexShader: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pFunction: ?*const u32,
                ppShader: ?*?*IDirect3DVertexShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pFunction: ?*const u32,
                ppShader: ?*?*IDirect3DVertexShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetVertexShader: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pShader: ?*IDirect3DVertexShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pShader: ?*IDirect3DVertexShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetVertexShader: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                ppShader: ?*?*IDirect3DVertexShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                ppShader: ?*?*IDirect3DVertexShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetVertexShaderConstantF: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const f32,
                Vector4fCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const f32,
                Vector4fCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetVertexShaderConstantF: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*f32,
                Vector4fCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*f32,
                Vector4fCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetVertexShaderConstantI: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const i32,
                Vector4iCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const i32,
                Vector4iCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetVertexShaderConstantI: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*i32,
                Vector4iCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*i32,
                Vector4iCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetVertexShaderConstantB: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const BOOL,
                BoolCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const BOOL,
                BoolCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetVertexShaderConstantB: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*BOOL,
                BoolCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*BOOL,
                BoolCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetStreamSource: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StreamNumber: u32,
                pStreamData: ?*IDirect3DVertexBuffer9,
                OffsetInBytes: u32,
                Stride: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StreamNumber: u32,
                pStreamData: ?*IDirect3DVertexBuffer9,
                OffsetInBytes: u32,
                Stride: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetStreamSource: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StreamNumber: u32,
                ppStreamData: ?*?*IDirect3DVertexBuffer9,
                pOffsetInBytes: ?*u32,
                pStride: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StreamNumber: u32,
                ppStreamData: ?*?*IDirect3DVertexBuffer9,
                pOffsetInBytes: ?*u32,
                pStride: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetStreamSourceFreq: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StreamNumber: u32,
                Setting: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StreamNumber: u32,
                Setting: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetStreamSourceFreq: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StreamNumber: u32,
                pSetting: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StreamNumber: u32,
                pSetting: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetIndices: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pIndexData: ?*IDirect3DIndexBuffer9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pIndexData: ?*IDirect3DIndexBuffer9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetIndices: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                ppIndexData: ?*?*IDirect3DIndexBuffer9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                ppIndexData: ?*?*IDirect3DIndexBuffer9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreatePixelShader: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pFunction: ?*const u32,
                ppShader: ?*?*IDirect3DPixelShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pFunction: ?*const u32,
                ppShader: ?*?*IDirect3DPixelShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetPixelShader: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                pShader: ?*IDirect3DPixelShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                pShader: ?*IDirect3DPixelShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetPixelShader: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                ppShader: ?*?*IDirect3DPixelShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                ppShader: ?*?*IDirect3DPixelShader9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetPixelShaderConstantF: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const f32,
                Vector4fCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const f32,
                Vector4fCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetPixelShaderConstantF: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*f32,
                Vector4fCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*f32,
                Vector4fCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetPixelShaderConstantI: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const i32,
                Vector4iCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const i32,
                Vector4iCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetPixelShaderConstantI: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*i32,
                Vector4iCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*i32,
                Vector4iCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetPixelShaderConstantB: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const BOOL,
                BoolCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*const BOOL,
                BoolCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetPixelShaderConstantB: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*BOOL,
                BoolCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                StartRegister: u32,
                pConstantData: ?*BOOL,
                BoolCount: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        DrawRectPatch: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Handle: u32,
                pNumSegs: ?*const f32,
                pRectPatchInfo: ?*const D3DRECTPATCH_INFO,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Handle: u32,
                pNumSegs: ?*const f32,
                pRectPatchInfo: ?*const D3DRECTPATCH_INFO,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        DrawTriPatch: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Handle: u32,
                pNumSegs: ?*const f32,
                pTriPatchInfo: ?*const D3DTRIPATCH_INFO,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Handle: u32,
                pNumSegs: ?*const f32,
                pTriPatchInfo: ?*const D3DTRIPATCH_INFO,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        DeletePatch: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Handle: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Handle: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateQuery: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9,
                Type: D3DQUERYTYPE,
                ppQuery: ?*?*IDirect3DQuery9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9,
                Type: D3DQUERYTYPE,
                ppQuery: ?*?*IDirect3DQuery9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_TestCooperativeLevel(self: *const T) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).TestCooperativeLevel(@as(*const IDirect3DDevice9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetAvailableTextureMem(self: *const T) u32 {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetAvailableTextureMem(@as(*const IDirect3DDevice9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_EvictManagedResources(self: *const T) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).EvictManagedResources(@as(*const IDirect3DDevice9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetDirect3D(self: *const T, ppD3D9: ?*?*IDirect3D9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetDirect3D(@as(*const IDirect3DDevice9, @ptrCast(self)), ppD3D9);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetDeviceCaps(self: *const T, pCaps: ?*D3DCAPS9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetDeviceCaps(@as(*const IDirect3DDevice9, @ptrCast(self)), pCaps);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetDisplayMode(self: *const T, iSwapChain: u32, pMode: ?*D3DDISPLAYMODE) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetDisplayMode(@as(*const IDirect3DDevice9, @ptrCast(self)), iSwapChain, pMode);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetCreationParameters(self: *const T, pParameters: ?*D3DDEVICE_CREATION_PARAMETERS) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetCreationParameters(@as(*const IDirect3DDevice9, @ptrCast(self)), pParameters);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetCursorProperties(self: *const T, XHotSpot: u32, YHotSpot: u32, pCursorBitmap: ?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetCursorProperties(@as(*const IDirect3DDevice9, @ptrCast(self)), XHotSpot, YHotSpot, pCursorBitmap);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetCursorPosition(self: *const T, X: i32, Y: i32, Flags: u32) void {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetCursorPosition(@as(*const IDirect3DDevice9, @ptrCast(self)), X, Y, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_ShowCursor(self: *const T, bShow: BOOL) BOOL {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).ShowCursor(@as(*const IDirect3DDevice9, @ptrCast(self)), bShow);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateAdditionalSwapChain(self: *const T, pPresentationParameters: ?*D3DPRESENT_PARAMETERS, pSwapChain: ?*?*IDirect3DSwapChain9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateAdditionalSwapChain(@as(*const IDirect3DDevice9, @ptrCast(self)), pPresentationParameters, pSwapChain);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetSwapChain(self: *const T, iSwapChain: u32, pSwapChain: ?*?*IDirect3DSwapChain9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetSwapChain(@as(*const IDirect3DDevice9, @ptrCast(self)), iSwapChain, pSwapChain);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetNumberOfSwapChains(self: *const T) u32 {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetNumberOfSwapChains(@as(*const IDirect3DDevice9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_Reset(self: *const T, pPresentationParameters: ?*D3DPRESENT_PARAMETERS) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).Reset(@as(*const IDirect3DDevice9, @ptrCast(self)), pPresentationParameters);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_Present(self: *const T, pSourceRect: ?*const RECT, pDestRect: ?*const RECT, hDestWindowOverride: ?HWND, pDirtyRegion: ?*const RGNDATA) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).Present(@as(*const IDirect3DDevice9, @ptrCast(self)), pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetBackBuffer(self: *const T, iSwapChain: u32, iBackBuffer: u32, Type: D3DBACKBUFFER_TYPE, ppBackBuffer: ?*?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetBackBuffer(@as(*const IDirect3DDevice9, @ptrCast(self)), iSwapChain, iBackBuffer, Type, ppBackBuffer);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetRasterStatus(self: *const T, iSwapChain: u32, pRasterStatus: ?*D3DRASTER_STATUS) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetRasterStatus(@as(*const IDirect3DDevice9, @ptrCast(self)), iSwapChain, pRasterStatus);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetDialogBoxMode(self: *const T, bEnableDialogs: BOOL) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetDialogBoxMode(@as(*const IDirect3DDevice9, @ptrCast(self)), bEnableDialogs);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetGammaRamp(self: *const T, iSwapChain: u32, Flags: u32, pRamp: ?*const D3DGAMMARAMP) void {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetGammaRamp(@as(*const IDirect3DDevice9, @ptrCast(self)), iSwapChain, Flags, pRamp);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetGammaRamp(self: *const T, iSwapChain: u32, pRamp: ?*D3DGAMMARAMP) void {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetGammaRamp(@as(*const IDirect3DDevice9, @ptrCast(self)), iSwapChain, pRamp);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateTexture(self: *const T, Width: u32, Height: u32, Levels: u32, Usage: u32, Format: D3DFORMAT, Pool: D3DPOOL, ppTexture: ?*?*IDirect3DTexture9, pSharedHandle: ?*?HANDLE) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateTexture(@as(*const IDirect3DDevice9, @ptrCast(self)), Width, Height, Levels, Usage, Format, Pool, ppTexture, pSharedHandle);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateVolumeTexture(self: *const T, Width: u32, Height: u32, Depth: u32, Levels: u32, Usage: u32, Format: D3DFORMAT, Pool: D3DPOOL, ppVolumeTexture: ?*?*IDirect3DVolumeTexture9, pSharedHandle: ?*?HANDLE) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateVolumeTexture(@as(*const IDirect3DDevice9, @ptrCast(self)), Width, Height, Depth, Levels, Usage, Format, Pool, ppVolumeTexture, pSharedHandle);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateCubeTexture(self: *const T, EdgeLength: u32, Levels: u32, Usage: u32, Format: D3DFORMAT, Pool: D3DPOOL, ppCubeTexture: ?*?*IDirect3DCubeTexture9, pSharedHandle: ?*?HANDLE) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateCubeTexture(@as(*const IDirect3DDevice9, @ptrCast(self)), EdgeLength, Levels, Usage, Format, Pool, ppCubeTexture, pSharedHandle);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateVertexBuffer(self: *const T, Length: u32, Usage: u32, FVF: u32, Pool: D3DPOOL, ppVertexBuffer: ?*?*IDirect3DVertexBuffer9, pSharedHandle: ?*?HANDLE) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateVertexBuffer(@as(*const IDirect3DDevice9, @ptrCast(self)), Length, Usage, FVF, Pool, ppVertexBuffer, pSharedHandle);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateIndexBuffer(self: *const T, Length: u32, Usage: u32, Format: D3DFORMAT, Pool: D3DPOOL, ppIndexBuffer: ?*?*IDirect3DIndexBuffer9, pSharedHandle: ?*?HANDLE) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateIndexBuffer(@as(*const IDirect3DDevice9, @ptrCast(self)), Length, Usage, Format, Pool, ppIndexBuffer, pSharedHandle);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateRenderTarget(self: *const T, Width: u32, Height: u32, Format: D3DFORMAT, MultiSample: D3DMULTISAMPLE_TYPE, MultisampleQuality: u32, Lockable: BOOL, ppSurface: ?*?*IDirect3DSurface9, pSharedHandle: ?*?HANDLE) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateRenderTarget(@as(*const IDirect3DDevice9, @ptrCast(self)), Width, Height, Format, MultiSample, MultisampleQuality, Lockable, ppSurface, pSharedHandle);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateDepthStencilSurface(self: *const T, Width: u32, Height: u32, Format: D3DFORMAT, MultiSample: D3DMULTISAMPLE_TYPE, MultisampleQuality: u32, Discard: BOOL, ppSurface: ?*?*IDirect3DSurface9, pSharedHandle: ?*?HANDLE) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateDepthStencilSurface(@as(*const IDirect3DDevice9, @ptrCast(self)), Width, Height, Format, MultiSample, MultisampleQuality, Discard, ppSurface, pSharedHandle);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_UpdateSurface(self: *const T, pSourceSurface: ?*IDirect3DSurface9, pSourceRect: ?*const RECT, pDestinationSurface: ?*IDirect3DSurface9, pDestPoint: ?*const POINT) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).UpdateSurface(@as(*const IDirect3DDevice9, @ptrCast(self)), pSourceSurface, pSourceRect, pDestinationSurface, pDestPoint);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_UpdateTexture(self: *const T, pSourceTexture: ?*IDirect3DBaseTexture9, pDestinationTexture: ?*IDirect3DBaseTexture9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).UpdateTexture(@as(*const IDirect3DDevice9, @ptrCast(self)), pSourceTexture, pDestinationTexture);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetRenderTargetData(self: *const T, pRenderTarget: ?*IDirect3DSurface9, pDestSurface: ?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetRenderTargetData(@as(*const IDirect3DDevice9, @ptrCast(self)), pRenderTarget, pDestSurface);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetFrontBufferData(self: *const T, iSwapChain: u32, pDestSurface: ?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetFrontBufferData(@as(*const IDirect3DDevice9, @ptrCast(self)), iSwapChain, pDestSurface);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_StretchRect(self: *const T, pSourceSurface: ?*IDirect3DSurface9, pSourceRect: ?*const RECT, pDestSurface: ?*IDirect3DSurface9, pDestRect: ?*const RECT, Filter: D3DTEXTUREFILTERTYPE) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).StretchRect(@as(*const IDirect3DDevice9, @ptrCast(self)), pSourceSurface, pSourceRect, pDestSurface, pDestRect, Filter);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_ColorFill(self: *const T, pSurface: ?*IDirect3DSurface9, pRect: ?*const RECT, color: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).ColorFill(@as(*const IDirect3DDevice9, @ptrCast(self)), pSurface, pRect, color);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateOffscreenPlainSurface(self: *const T, Width: u32, Height: u32, Format: D3DFORMAT, Pool: D3DPOOL, ppSurface: ?*?*IDirect3DSurface9, pSharedHandle: ?*?HANDLE) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateOffscreenPlainSurface(@as(*const IDirect3DDevice9, @ptrCast(self)), Width, Height, Format, Pool, ppSurface, pSharedHandle);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetRenderTarget(self: *const T, RenderTargetIndex: u32, pRenderTarget: ?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetRenderTarget(@as(*const IDirect3DDevice9, @ptrCast(self)), RenderTargetIndex, pRenderTarget);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetRenderTarget(self: *const T, RenderTargetIndex: u32, ppRenderTarget: ?*?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetRenderTarget(@as(*const IDirect3DDevice9, @ptrCast(self)), RenderTargetIndex, ppRenderTarget);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetDepthStencilSurface(self: *const T, pNewZStencil: ?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetDepthStencilSurface(@as(*const IDirect3DDevice9, @ptrCast(self)), pNewZStencil);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetDepthStencilSurface(self: *const T, ppZStencilSurface: ?*?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetDepthStencilSurface(@as(*const IDirect3DDevice9, @ptrCast(self)), ppZStencilSurface);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_BeginScene(self: *const T) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).BeginScene(@as(*const IDirect3DDevice9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_EndScene(self: *const T) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).EndScene(@as(*const IDirect3DDevice9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_Clear(self: *const T, Count: u32, pRects: ?*const D3DRECT, Flags: u32, Color: u32, Z: f32, Stencil: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).Clear(@as(*const IDirect3DDevice9, @ptrCast(self)), Count, pRects, Flags, Color, Z, Stencil);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetTransform(self: *const T, State: D3DTRANSFORMSTATETYPE, pMatrix: ?*const D3DMATRIX) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetTransform(@as(*const IDirect3DDevice9, @ptrCast(self)), State, pMatrix);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetTransform(self: *const T, State: D3DTRANSFORMSTATETYPE, pMatrix: ?*D3DMATRIX) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetTransform(@as(*const IDirect3DDevice9, @ptrCast(self)), State, pMatrix);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_MultiplyTransform(self: *const T, param0: D3DTRANSFORMSTATETYPE, param1: ?*const D3DMATRIX) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).MultiplyTransform(@as(*const IDirect3DDevice9, @ptrCast(self)), param0, param1);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetViewport(self: *const T, pViewport: ?*const D3DVIEWPORT9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetViewport(@as(*const IDirect3DDevice9, @ptrCast(self)), pViewport);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetViewport(self: *const T, pViewport: ?*D3DVIEWPORT9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetViewport(@as(*const IDirect3DDevice9, @ptrCast(self)), pViewport);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetMaterial(self: *const T, pMaterial: ?*const D3DMATERIAL9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetMaterial(@as(*const IDirect3DDevice9, @ptrCast(self)), pMaterial);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetMaterial(self: *const T, pMaterial: ?*D3DMATERIAL9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetMaterial(@as(*const IDirect3DDevice9, @ptrCast(self)), pMaterial);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetLight(self: *const T, Index: u32, param1: ?*const D3DLIGHT9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetLight(@as(*const IDirect3DDevice9, @ptrCast(self)), Index, param1);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetLight(self: *const T, Index: u32, param1: ?*D3DLIGHT9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetLight(@as(*const IDirect3DDevice9, @ptrCast(self)), Index, param1);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_LightEnable(self: *const T, Index: u32, Enable: BOOL) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).LightEnable(@as(*const IDirect3DDevice9, @ptrCast(self)), Index, Enable);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetLightEnable(self: *const T, Index: u32, pEnable: ?*BOOL) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetLightEnable(@as(*const IDirect3DDevice9, @ptrCast(self)), Index, pEnable);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetClipPlane(self: *const T, Index: u32, pPlane: ?*const f32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetClipPlane(@as(*const IDirect3DDevice9, @ptrCast(self)), Index, pPlane);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetClipPlane(self: *const T, Index: u32, pPlane: ?*f32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetClipPlane(@as(*const IDirect3DDevice9, @ptrCast(self)), Index, pPlane);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetRenderState(self: *const T, State: D3DRENDERSTATETYPE, Value: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetRenderState(@as(*const IDirect3DDevice9, @ptrCast(self)), State, Value);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetRenderState(self: *const T, State: D3DRENDERSTATETYPE, pValue: ?*u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetRenderState(@as(*const IDirect3DDevice9, @ptrCast(self)), State, pValue);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateStateBlock(self: *const T, Type: D3DSTATEBLOCKTYPE, ppSB: ?*?*IDirect3DStateBlock9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateStateBlock(@as(*const IDirect3DDevice9, @ptrCast(self)), Type, ppSB);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_BeginStateBlock(self: *const T) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).BeginStateBlock(@as(*const IDirect3DDevice9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_EndStateBlock(self: *const T, ppSB: ?*?*IDirect3DStateBlock9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).EndStateBlock(@as(*const IDirect3DDevice9, @ptrCast(self)), ppSB);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetClipStatus(self: *const T, pClipStatus: ?*const D3DCLIPSTATUS9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetClipStatus(@as(*const IDirect3DDevice9, @ptrCast(self)), pClipStatus);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetClipStatus(self: *const T, pClipStatus: ?*D3DCLIPSTATUS9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetClipStatus(@as(*const IDirect3DDevice9, @ptrCast(self)), pClipStatus);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetTexture(self: *const T, Stage: u32, ppTexture: ?*?*IDirect3DBaseTexture9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetTexture(@as(*const IDirect3DDevice9, @ptrCast(self)), Stage, ppTexture);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetTexture(self: *const T, Stage: u32, pTexture: ?*IDirect3DBaseTexture9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetTexture(@as(*const IDirect3DDevice9, @ptrCast(self)), Stage, pTexture);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetTextureStageState(self: *const T, Stage: u32, Type: D3DTEXTURESTAGESTATETYPE, pValue: ?*u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetTextureStageState(@as(*const IDirect3DDevice9, @ptrCast(self)), Stage, Type, pValue);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetTextureStageState(self: *const T, Stage: u32, Type: D3DTEXTURESTAGESTATETYPE, Value: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetTextureStageState(@as(*const IDirect3DDevice9, @ptrCast(self)), Stage, Type, Value);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetSamplerState(self: *const T, Sampler: u32, Type: D3DSAMPLERSTATETYPE, pValue: ?*u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetSamplerState(@as(*const IDirect3DDevice9, @ptrCast(self)), Sampler, Type, pValue);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetSamplerState(self: *const T, Sampler: u32, Type: D3DSAMPLERSTATETYPE, Value: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetSamplerState(@as(*const IDirect3DDevice9, @ptrCast(self)), Sampler, Type, Value);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_ValidateDevice(self: *const T, pNumPasses: ?*u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).ValidateDevice(@as(*const IDirect3DDevice9, @ptrCast(self)), pNumPasses);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetPaletteEntries(self: *const T, PaletteNumber: u32, pEntries: ?*const PALETTEENTRY) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetPaletteEntries(@as(*const IDirect3DDevice9, @ptrCast(self)), PaletteNumber, pEntries);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetPaletteEntries(self: *const T, PaletteNumber: u32, pEntries: ?*PALETTEENTRY) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetPaletteEntries(@as(*const IDirect3DDevice9, @ptrCast(self)), PaletteNumber, pEntries);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetCurrentTexturePalette(self: *const T, PaletteNumber: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetCurrentTexturePalette(@as(*const IDirect3DDevice9, @ptrCast(self)), PaletteNumber);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetCurrentTexturePalette(self: *const T, PaletteNumber: ?*u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetCurrentTexturePalette(@as(*const IDirect3DDevice9, @ptrCast(self)), PaletteNumber);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetScissorRect(self: *const T, pRect: ?*const RECT) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetScissorRect(@as(*const IDirect3DDevice9, @ptrCast(self)), pRect);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetScissorRect(self: *const T, pRect: ?*RECT) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetScissorRect(@as(*const IDirect3DDevice9, @ptrCast(self)), pRect);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetSoftwareVertexProcessing(self: *const T, bSoftware: BOOL) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetSoftwareVertexProcessing(@as(*const IDirect3DDevice9, @ptrCast(self)), bSoftware);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetSoftwareVertexProcessing(self: *const T) BOOL {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetSoftwareVertexProcessing(@as(*const IDirect3DDevice9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetNPatchMode(self: *const T, nSegments: f32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetNPatchMode(@as(*const IDirect3DDevice9, @ptrCast(self)), nSegments);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetNPatchMode(self: *const T) f32 {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetNPatchMode(@as(*const IDirect3DDevice9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_DrawPrimitive(self: *const T, PrimitiveType: D3DPRIMITIVETYPE, StartVertex: u32, PrimitiveCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).DrawPrimitive(@as(*const IDirect3DDevice9, @ptrCast(self)), PrimitiveType, StartVertex, PrimitiveCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_DrawIndexedPrimitive(self: *const T, param0: D3DPRIMITIVETYPE, BaseVertexIndex: i32, MinVertexIndex: u32, NumVertices: u32, startIndex: u32, primCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).DrawIndexedPrimitive(@as(*const IDirect3DDevice9, @ptrCast(self)), param0, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_DrawPrimitiveUP(self: *const T, PrimitiveType: D3DPRIMITIVETYPE, PrimitiveCount: u32, pVertexStreamZeroData: ?*const anyopaque, VertexStreamZeroStride: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).DrawPrimitiveUP(@as(*const IDirect3DDevice9, @ptrCast(self)), PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_DrawIndexedPrimitiveUP(self: *const T, PrimitiveType: D3DPRIMITIVETYPE, MinVertexIndex: u32, NumVertices: u32, PrimitiveCount: u32, pIndexData: ?*const anyopaque, IndexDataFormat: D3DFORMAT, pVertexStreamZeroData: ?*const anyopaque, VertexStreamZeroStride: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).DrawIndexedPrimitiveUP(@as(*const IDirect3DDevice9, @ptrCast(self)), PrimitiveType, MinVertexIndex, NumVertices, PrimitiveCount, pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_ProcessVertices(self: *const T, SrcStartIndex: u32, DestIndex: u32, VertexCount: u32, pDestBuffer: ?*IDirect3DVertexBuffer9, pVertexDecl: ?*IDirect3DVertexDeclaration9, Flags: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).ProcessVertices(@as(*const IDirect3DDevice9, @ptrCast(self)), SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateVertexDeclaration(self: *const T, pVertexElements: ?*const D3DVERTEXELEMENT9, ppDecl: ?*?*IDirect3DVertexDeclaration9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateVertexDeclaration(@as(*const IDirect3DDevice9, @ptrCast(self)), pVertexElements, ppDecl);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetVertexDeclaration(self: *const T, pDecl: ?*IDirect3DVertexDeclaration9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetVertexDeclaration(@as(*const IDirect3DDevice9, @ptrCast(self)), pDecl);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetVertexDeclaration(self: *const T, ppDecl: ?*?*IDirect3DVertexDeclaration9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetVertexDeclaration(@as(*const IDirect3DDevice9, @ptrCast(self)), ppDecl);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetFVF(self: *const T, FVF: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetFVF(@as(*const IDirect3DDevice9, @ptrCast(self)), FVF);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetFVF(self: *const T, pFVF: ?*u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetFVF(@as(*const IDirect3DDevice9, @ptrCast(self)), pFVF);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateVertexShader(self: *const T, pFunction: ?*const u32, ppShader: ?*?*IDirect3DVertexShader9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateVertexShader(@as(*const IDirect3DDevice9, @ptrCast(self)), pFunction, ppShader);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetVertexShader(self: *const T, pShader: ?*IDirect3DVertexShader9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetVertexShader(@as(*const IDirect3DDevice9, @ptrCast(self)), pShader);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetVertexShader(self: *const T, ppShader: ?*?*IDirect3DVertexShader9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetVertexShader(@as(*const IDirect3DDevice9, @ptrCast(self)), ppShader);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetVertexShaderConstantF(self: *const T, StartRegister: u32, pConstantData: ?*const f32, Vector4fCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetVertexShaderConstantF(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, Vector4fCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetVertexShaderConstantF(self: *const T, StartRegister: u32, pConstantData: ?*f32, Vector4fCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetVertexShaderConstantF(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, Vector4fCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetVertexShaderConstantI(self: *const T, StartRegister: u32, pConstantData: ?*const i32, Vector4iCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetVertexShaderConstantI(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, Vector4iCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetVertexShaderConstantI(self: *const T, StartRegister: u32, pConstantData: ?*i32, Vector4iCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetVertexShaderConstantI(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, Vector4iCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetVertexShaderConstantB(self: *const T, StartRegister: u32, pConstantData: ?*const BOOL, BoolCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetVertexShaderConstantB(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, BoolCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetVertexShaderConstantB(self: *const T, StartRegister: u32, pConstantData: ?*BOOL, BoolCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetVertexShaderConstantB(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, BoolCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetStreamSource(self: *const T, StreamNumber: u32, pStreamData: ?*IDirect3DVertexBuffer9, OffsetInBytes: u32, Stride: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetStreamSource(@as(*const IDirect3DDevice9, @ptrCast(self)), StreamNumber, pStreamData, OffsetInBytes, Stride);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetStreamSource(self: *const T, StreamNumber: u32, ppStreamData: ?*?*IDirect3DVertexBuffer9, pOffsetInBytes: ?*u32, pStride: ?*u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetStreamSource(@as(*const IDirect3DDevice9, @ptrCast(self)), StreamNumber, ppStreamData, pOffsetInBytes, pStride);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetStreamSourceFreq(self: *const T, StreamNumber: u32, Setting: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetStreamSourceFreq(@as(*const IDirect3DDevice9, @ptrCast(self)), StreamNumber, Setting);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetStreamSourceFreq(self: *const T, StreamNumber: u32, pSetting: ?*u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetStreamSourceFreq(@as(*const IDirect3DDevice9, @ptrCast(self)), StreamNumber, pSetting);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetIndices(self: *const T, pIndexData: ?*IDirect3DIndexBuffer9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetIndices(@as(*const IDirect3DDevice9, @ptrCast(self)), pIndexData);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetIndices(self: *const T, ppIndexData: ?*?*IDirect3DIndexBuffer9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetIndices(@as(*const IDirect3DDevice9, @ptrCast(self)), ppIndexData);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreatePixelShader(self: *const T, pFunction: ?*const u32, ppShader: ?*?*IDirect3DPixelShader9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreatePixelShader(@as(*const IDirect3DDevice9, @ptrCast(self)), pFunction, ppShader);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetPixelShader(self: *const T, pShader: ?*IDirect3DPixelShader9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetPixelShader(@as(*const IDirect3DDevice9, @ptrCast(self)), pShader);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetPixelShader(self: *const T, ppShader: ?*?*IDirect3DPixelShader9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetPixelShader(@as(*const IDirect3DDevice9, @ptrCast(self)), ppShader);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetPixelShaderConstantF(self: *const T, StartRegister: u32, pConstantData: ?*const f32, Vector4fCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetPixelShaderConstantF(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, Vector4fCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetPixelShaderConstantF(self: *const T, StartRegister: u32, pConstantData: ?*f32, Vector4fCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetPixelShaderConstantF(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, Vector4fCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetPixelShaderConstantI(self: *const T, StartRegister: u32, pConstantData: ?*const i32, Vector4iCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetPixelShaderConstantI(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, Vector4iCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetPixelShaderConstantI(self: *const T, StartRegister: u32, pConstantData: ?*i32, Vector4iCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetPixelShaderConstantI(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, Vector4iCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_SetPixelShaderConstantB(self: *const T, StartRegister: u32, pConstantData: ?*const BOOL, BoolCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).SetPixelShaderConstantB(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, BoolCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_GetPixelShaderConstantB(self: *const T, StartRegister: u32, pConstantData: ?*BOOL, BoolCount: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).GetPixelShaderConstantB(@as(*const IDirect3DDevice9, @ptrCast(self)), StartRegister, pConstantData, BoolCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_DrawRectPatch(self: *const T, Handle: u32, pNumSegs: ?*const f32, pRectPatchInfo: ?*const D3DRECTPATCH_INFO) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).DrawRectPatch(@as(*const IDirect3DDevice9, @ptrCast(self)), Handle, pNumSegs, pRectPatchInfo);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_DrawTriPatch(self: *const T, Handle: u32, pNumSegs: ?*const f32, pTriPatchInfo: ?*const D3DTRIPATCH_INFO) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).DrawTriPatch(@as(*const IDirect3DDevice9, @ptrCast(self)), Handle, pNumSegs, pTriPatchInfo);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_DeletePatch(self: *const T, Handle: u32) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).DeletePatch(@as(*const IDirect3DDevice9, @ptrCast(self)), Handle);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9_CreateQuery(self: *const T, Type: D3DQUERYTYPE, ppQuery: ?*?*IDirect3DQuery9) HRESULT {
                return @as(*const IDirect3DDevice9.VTable, @ptrCast(self.vtable)).CreateQuery(@as(*const IDirect3DDevice9, @ptrCast(self)), Type, ppQuery);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DStateBlock9_Value = Guid.initString("b07c4fe5-310d-4ba8-a23c-4f0f206f218b");
pub const IID_IDirect3DStateBlock9 = &IID_IDirect3DStateBlock9_Value;
pub const IDirect3DStateBlock9 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DStateBlock9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DStateBlock9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Capture: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DStateBlock9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DStateBlock9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Apply: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DStateBlock9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DStateBlock9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DStateBlock9_GetDevice(self: *const T, ppDevice: ?*?*IDirect3DDevice9) HRESULT {
                return @as(*const IDirect3DStateBlock9.VTable, @ptrCast(self.vtable)).GetDevice(@as(*const IDirect3DStateBlock9, @ptrCast(self)), ppDevice);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DStateBlock9_Capture(self: *const T) HRESULT {
                return @as(*const IDirect3DStateBlock9.VTable, @ptrCast(self.vtable)).Capture(@as(*const IDirect3DStateBlock9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DStateBlock9_Apply(self: *const T) HRESULT {
                return @as(*const IDirect3DStateBlock9.VTable, @ptrCast(self.vtable)).Apply(@as(*const IDirect3DStateBlock9, @ptrCast(self)));
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DSwapChain9_Value = Guid.initString("794950f2-adfc-458a-905e-10a10b0b503b");
pub const IID_IDirect3DSwapChain9 = &IID_IDirect3DSwapChain9_Value;
pub const IDirect3DSwapChain9 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        Present: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSwapChain9,
                pSourceRect: ?*const RECT,
                pDestRect: ?*const RECT,
                hDestWindowOverride: ?HWND,
                pDirtyRegion: ?*const RGNDATA,
                dwFlags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSwapChain9,
                pSourceRect: ?*const RECT,
                pDestRect: ?*const RECT,
                hDestWindowOverride: ?HWND,
                pDirtyRegion: ?*const RGNDATA,
                dwFlags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetFrontBufferData: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSwapChain9,
                pDestSurface: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSwapChain9,
                pDestSurface: ?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetBackBuffer: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSwapChain9,
                iBackBuffer: u32,
                Type: D3DBACKBUFFER_TYPE,
                ppBackBuffer: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSwapChain9,
                iBackBuffer: u32,
                Type: D3DBACKBUFFER_TYPE,
                ppBackBuffer: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetRasterStatus: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSwapChain9,
                pRasterStatus: ?*D3DRASTER_STATUS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSwapChain9,
                pRasterStatus: ?*D3DRASTER_STATUS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDisplayMode: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSwapChain9,
                pMode: ?*D3DDISPLAYMODE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSwapChain9,
                pMode: ?*D3DDISPLAYMODE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSwapChain9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSwapChain9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetPresentParameters: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSwapChain9,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSwapChain9,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSwapChain9_Present(self: *const T, pSourceRect: ?*const RECT, pDestRect: ?*const RECT, hDestWindowOverride: ?HWND, pDirtyRegion: ?*const RGNDATA, dwFlags: u32) HRESULT {
                return @as(*const IDirect3DSwapChain9.VTable, @ptrCast(self.vtable)).Present(@as(*const IDirect3DSwapChain9, @ptrCast(self)), pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSwapChain9_GetFrontBufferData(self: *const T, pDestSurface: ?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DSwapChain9.VTable, @ptrCast(self.vtable)).GetFrontBufferData(@as(*const IDirect3DSwapChain9, @ptrCast(self)), pDestSurface);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSwapChain9_GetBackBuffer(self: *const T, iBackBuffer: u32, Type: D3DBACKBUFFER_TYPE, ppBackBuffer: ?*?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DSwapChain9.VTable, @ptrCast(self.vtable)).GetBackBuffer(@as(*const IDirect3DSwapChain9, @ptrCast(self)), iBackBuffer, Type, ppBackBuffer);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSwapChain9_GetRasterStatus(self: *const T, pRasterStatus: ?*D3DRASTER_STATUS) HRESULT {
                return @as(*const IDirect3DSwapChain9.VTable, @ptrCast(self.vtable)).GetRasterStatus(@as(*const IDirect3DSwapChain9, @ptrCast(self)), pRasterStatus);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSwapChain9_GetDisplayMode(self: *const T, pMode: ?*D3DDISPLAYMODE) HRESULT {
                return @as(*const IDirect3DSwapChain9.VTable, @ptrCast(self.vtable)).GetDisplayMode(@as(*const IDirect3DSwapChain9, @ptrCast(self)), pMode);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSwapChain9_GetDevice(self: *const T, ppDevice: ?*?*IDirect3DDevice9) HRESULT {
                return @as(*const IDirect3DSwapChain9.VTable, @ptrCast(self.vtable)).GetDevice(@as(*const IDirect3DSwapChain9, @ptrCast(self)), ppDevice);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSwapChain9_GetPresentParameters(self: *const T, pPresentationParameters: ?*D3DPRESENT_PARAMETERS) HRESULT {
                return @as(*const IDirect3DSwapChain9.VTable, @ptrCast(self.vtable)).GetPresentParameters(@as(*const IDirect3DSwapChain9, @ptrCast(self)), pPresentationParameters);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DResource9_Value = Guid.initString("05eec05d-8f7d-4362-b999-d1baf357c704");
pub const IID_IDirect3DResource9 = &IID_IDirect3DResource9_Value;
pub const IDirect3DResource9 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DResource9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DResource9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetPrivateData: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DResource9,
                refguid: ?*const Guid,
                pData: ?*const anyopaque,
                SizeOfData: u32,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DResource9,
                refguid: ?*const Guid,
                pData: ?*const anyopaque,
                SizeOfData: u32,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetPrivateData: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DResource9,
                refguid: ?*const Guid,
                pData: ?*anyopaque,
                pSizeOfData: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DResource9,
                refguid: ?*const Guid,
                pData: ?*anyopaque,
                pSizeOfData: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        FreePrivateData: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DResource9,
                refguid: ?*const Guid,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DResource9,
                refguid: ?*const Guid,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetPriority: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DResource9,
                PriorityNew: u32,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3DResource9,
                PriorityNew: u32,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        GetPriority: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DResource9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3DResource9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        PreLoad: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DResource9,
            ) callconv(@import("std").os.windows.WINAPI) void,
            else => *const fn (
                self: *const IDirect3DResource9,
            ) callconv(@import("std").os.windows.WINAPI) void,
        },
        GetType: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DResource9,
            ) callconv(@import("std").os.windows.WINAPI) D3DRESOURCETYPE,
            else => *const fn (
                self: *const IDirect3DResource9,
            ) callconv(@import("std").os.windows.WINAPI) D3DRESOURCETYPE,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DResource9_GetDevice(self: *const T, ppDevice: ?*?*IDirect3DDevice9) HRESULT {
                return @as(*const IDirect3DResource9.VTable, @ptrCast(self.vtable)).GetDevice(@as(*const IDirect3DResource9, @ptrCast(self)), ppDevice);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DResource9_SetPrivateData(self: *const T, refguid: ?*const Guid, pData: ?*const anyopaque, SizeOfData: u32, Flags: u32) HRESULT {
                return @as(*const IDirect3DResource9.VTable, @ptrCast(self.vtable)).SetPrivateData(@as(*const IDirect3DResource9, @ptrCast(self)), refguid, pData, SizeOfData, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DResource9_GetPrivateData(self: *const T, refguid: ?*const Guid, pData: ?*anyopaque, pSizeOfData: ?*u32) HRESULT {
                return @as(*const IDirect3DResource9.VTable, @ptrCast(self.vtable)).GetPrivateData(@as(*const IDirect3DResource9, @ptrCast(self)), refguid, pData, pSizeOfData);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DResource9_FreePrivateData(self: *const T, refguid: ?*const Guid) HRESULT {
                return @as(*const IDirect3DResource9.VTable, @ptrCast(self.vtable)).FreePrivateData(@as(*const IDirect3DResource9, @ptrCast(self)), refguid);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DResource9_SetPriority(self: *const T, PriorityNew: u32) u32 {
                return @as(*const IDirect3DResource9.VTable, @ptrCast(self.vtable)).SetPriority(@as(*const IDirect3DResource9, @ptrCast(self)), PriorityNew);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DResource9_GetPriority(self: *const T) u32 {
                return @as(*const IDirect3DResource9.VTable, @ptrCast(self.vtable)).GetPriority(@as(*const IDirect3DResource9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DResource9_PreLoad(self: *const T) void {
                return @as(*const IDirect3DResource9.VTable, @ptrCast(self.vtable)).PreLoad(@as(*const IDirect3DResource9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DResource9_GetType(self: *const T) D3DRESOURCETYPE {
                return @as(*const IDirect3DResource9.VTable, @ptrCast(self.vtable)).GetType(@as(*const IDirect3DResource9, @ptrCast(self)));
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DVertexDeclaration9_Value = Guid.initString("dd13c59c-36fa-4098-a8fb-c7ed39dc8546");
pub const IID_IDirect3DVertexDeclaration9 = &IID_IDirect3DVertexDeclaration9_Value;
pub const IDirect3DVertexDeclaration9 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVertexDeclaration9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVertexDeclaration9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDeclaration: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVertexDeclaration9,
                pElement: ?*D3DVERTEXELEMENT9,
                pNumElements: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVertexDeclaration9,
                pElement: ?*D3DVERTEXELEMENT9,
                pNumElements: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVertexDeclaration9_GetDevice(self: *const T, ppDevice: ?*?*IDirect3DDevice9) HRESULT {
                return @as(*const IDirect3DVertexDeclaration9.VTable, @ptrCast(self.vtable)).GetDevice(@as(*const IDirect3DVertexDeclaration9, @ptrCast(self)), ppDevice);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVertexDeclaration9_GetDeclaration(self: *const T, pElement: ?*D3DVERTEXELEMENT9, pNumElements: ?*u32) HRESULT {
                return @as(*const IDirect3DVertexDeclaration9.VTable, @ptrCast(self.vtable)).GetDeclaration(@as(*const IDirect3DVertexDeclaration9, @ptrCast(self)), pElement, pNumElements);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DVertexShader9_Value = Guid.initString("efc5557e-6265-4613-8a94-43857889eb36");
pub const IID_IDirect3DVertexShader9 = &IID_IDirect3DVertexShader9_Value;
pub const IDirect3DVertexShader9 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVertexShader9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVertexShader9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetFunction: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVertexShader9,
                param0: ?*anyopaque,
                pSizeOfData: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVertexShader9,
                param0: ?*anyopaque,
                pSizeOfData: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVertexShader9_GetDevice(self: *const T, ppDevice: ?*?*IDirect3DDevice9) HRESULT {
                return @as(*const IDirect3DVertexShader9.VTable, @ptrCast(self.vtable)).GetDevice(@as(*const IDirect3DVertexShader9, @ptrCast(self)), ppDevice);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVertexShader9_GetFunction(self: *const T, param0: ?*anyopaque, pSizeOfData: ?*u32) HRESULT {
                return @as(*const IDirect3DVertexShader9.VTable, @ptrCast(self.vtable)).GetFunction(@as(*const IDirect3DVertexShader9, @ptrCast(self)), param0, pSizeOfData);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DPixelShader9_Value = Guid.initString("6d3bdbdc-5b02-4415-b852-ce5e8bccb289");
pub const IID_IDirect3DPixelShader9 = &IID_IDirect3DPixelShader9_Value;
pub const IDirect3DPixelShader9 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DPixelShader9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DPixelShader9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetFunction: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DPixelShader9,
                param0: ?*anyopaque,
                pSizeOfData: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DPixelShader9,
                param0: ?*anyopaque,
                pSizeOfData: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DPixelShader9_GetDevice(self: *const T, ppDevice: ?*?*IDirect3DDevice9) HRESULT {
                return @as(*const IDirect3DPixelShader9.VTable, @ptrCast(self.vtable)).GetDevice(@as(*const IDirect3DPixelShader9, @ptrCast(self)), ppDevice);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DPixelShader9_GetFunction(self: *const T, param0: ?*anyopaque, pSizeOfData: ?*u32) HRESULT {
                return @as(*const IDirect3DPixelShader9.VTable, @ptrCast(self.vtable)).GetFunction(@as(*const IDirect3DPixelShader9, @ptrCast(self)), param0, pSizeOfData);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DBaseTexture9_Value = Guid.initString("580ca87e-1d3c-4d54-991d-b7d3e3c298ce");
pub const IID_IDirect3DBaseTexture9 = &IID_IDirect3DBaseTexture9_Value;
pub const IDirect3DBaseTexture9 = extern struct {
    pub const VTable = extern struct {
        base: IDirect3DResource9.VTable,
        SetLOD: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DBaseTexture9,
                LODNew: u32,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3DBaseTexture9,
                LODNew: u32,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        GetLOD: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        GetLevelCount: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        SetAutoGenFilterType: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DBaseTexture9,
                FilterType: D3DTEXTUREFILTERTYPE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DBaseTexture9,
                FilterType: D3DTEXTUREFILTERTYPE,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetAutoGenFilterType: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) D3DTEXTUREFILTERTYPE,
            else => *const fn (
                self: *const IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) D3DTEXTUREFILTERTYPE,
        },
        GenerateMipSubLevels: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) void,
            else => *const fn (
                self: *const IDirect3DBaseTexture9,
            ) callconv(@import("std").os.windows.WINAPI) void,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IDirect3DResource9.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DBaseTexture9_SetLOD(self: *const T, LODNew: u32) u32 {
                return @as(*const IDirect3DBaseTexture9.VTable, @ptrCast(self.vtable)).SetLOD(@as(*const IDirect3DBaseTexture9, @ptrCast(self)), LODNew);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DBaseTexture9_GetLOD(self: *const T) u32 {
                return @as(*const IDirect3DBaseTexture9.VTable, @ptrCast(self.vtable)).GetLOD(@as(*const IDirect3DBaseTexture9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DBaseTexture9_GetLevelCount(self: *const T) u32 {
                return @as(*const IDirect3DBaseTexture9.VTable, @ptrCast(self.vtable)).GetLevelCount(@as(*const IDirect3DBaseTexture9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DBaseTexture9_SetAutoGenFilterType(self: *const T, FilterType: D3DTEXTUREFILTERTYPE) HRESULT {
                return @as(*const IDirect3DBaseTexture9.VTable, @ptrCast(self.vtable)).SetAutoGenFilterType(@as(*const IDirect3DBaseTexture9, @ptrCast(self)), FilterType);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DBaseTexture9_GetAutoGenFilterType(self: *const T) D3DTEXTUREFILTERTYPE {
                return @as(*const IDirect3DBaseTexture9.VTable, @ptrCast(self.vtable)).GetAutoGenFilterType(@as(*const IDirect3DBaseTexture9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DBaseTexture9_GenerateMipSubLevels(self: *const T) void {
                return @as(*const IDirect3DBaseTexture9.VTable, @ptrCast(self.vtable)).GenerateMipSubLevels(@as(*const IDirect3DBaseTexture9, @ptrCast(self)));
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DTexture9_Value = Guid.initString("85c31227-3de5-4f00-9b3a-f11ac38c18b5");
pub const IID_IDirect3DTexture9 = &IID_IDirect3DTexture9_Value;
pub const IDirect3DTexture9 = extern struct {
    pub const VTable = extern struct {
        base: IDirect3DBaseTexture9.VTable,
        GetLevelDesc: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DTexture9,
                Level: u32,
                pDesc: ?*D3DSURFACE_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DTexture9,
                Level: u32,
                pDesc: ?*D3DSURFACE_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetSurfaceLevel: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DTexture9,
                Level: u32,
                ppSurfaceLevel: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DTexture9,
                Level: u32,
                ppSurfaceLevel: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        LockRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DTexture9,
                Level: u32,
                pLockedRect: ?*D3DLOCKED_RECT,
                pRect: ?*const RECT,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DTexture9,
                Level: u32,
                pLockedRect: ?*D3DLOCKED_RECT,
                pRect: ?*const RECT,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        UnlockRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DTexture9,
                Level: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DTexture9,
                Level: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        AddDirtyRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DTexture9,
                pDirtyRect: ?*const RECT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DTexture9,
                pDirtyRect: ?*const RECT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IDirect3DBaseTexture9.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DTexture9_GetLevelDesc(self: *const T, Level: u32, pDesc: ?*D3DSURFACE_DESC) HRESULT {
                return @as(*const IDirect3DTexture9.VTable, @ptrCast(self.vtable)).GetLevelDesc(@as(*const IDirect3DTexture9, @ptrCast(self)), Level, pDesc);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DTexture9_GetSurfaceLevel(self: *const T, Level: u32, ppSurfaceLevel: ?*?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DTexture9.VTable, @ptrCast(self.vtable)).GetSurfaceLevel(@as(*const IDirect3DTexture9, @ptrCast(self)), Level, ppSurfaceLevel);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DTexture9_LockRect(self: *const T, Level: u32, pLockedRect: ?*D3DLOCKED_RECT, pRect: ?*const RECT, Flags: u32) HRESULT {
                return @as(*const IDirect3DTexture9.VTable, @ptrCast(self.vtable)).LockRect(@as(*const IDirect3DTexture9, @ptrCast(self)), Level, pLockedRect, pRect, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DTexture9_UnlockRect(self: *const T, Level: u32) HRESULT {
                return @as(*const IDirect3DTexture9.VTable, @ptrCast(self.vtable)).UnlockRect(@as(*const IDirect3DTexture9, @ptrCast(self)), Level);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DTexture9_AddDirtyRect(self: *const T, pDirtyRect: ?*const RECT) HRESULT {
                return @as(*const IDirect3DTexture9.VTable, @ptrCast(self.vtable)).AddDirtyRect(@as(*const IDirect3DTexture9, @ptrCast(self)), pDirtyRect);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DVolumeTexture9_Value = Guid.initString("2518526c-e789-4111-a7b9-47ef328d13e6");
pub const IID_IDirect3DVolumeTexture9 = &IID_IDirect3DVolumeTexture9_Value;
pub const IDirect3DVolumeTexture9 = extern struct {
    pub const VTable = extern struct {
        base: IDirect3DBaseTexture9.VTable,
        GetLevelDesc: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolumeTexture9,
                Level: u32,
                pDesc: ?*D3DVOLUME_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolumeTexture9,
                Level: u32,
                pDesc: ?*D3DVOLUME_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetVolumeLevel: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolumeTexture9,
                Level: u32,
                ppVolumeLevel: ?*?*IDirect3DVolume9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolumeTexture9,
                Level: u32,
                ppVolumeLevel: ?*?*IDirect3DVolume9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        LockBox: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolumeTexture9,
                Level: u32,
                pLockedVolume: ?*D3DLOCKED_BOX,
                pBox: ?*const D3DBOX,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolumeTexture9,
                Level: u32,
                pLockedVolume: ?*D3DLOCKED_BOX,
                pBox: ?*const D3DBOX,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        UnlockBox: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolumeTexture9,
                Level: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolumeTexture9,
                Level: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        AddDirtyBox: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolumeTexture9,
                pDirtyBox: ?*const D3DBOX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolumeTexture9,
                pDirtyBox: ?*const D3DBOX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IDirect3DBaseTexture9.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolumeTexture9_GetLevelDesc(self: *const T, Level: u32, pDesc: ?*D3DVOLUME_DESC) HRESULT {
                return @as(*const IDirect3DVolumeTexture9.VTable, @ptrCast(self.vtable)).GetLevelDesc(@as(*const IDirect3DVolumeTexture9, @ptrCast(self)), Level, pDesc);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolumeTexture9_GetVolumeLevel(self: *const T, Level: u32, ppVolumeLevel: ?*?*IDirect3DVolume9) HRESULT {
                return @as(*const IDirect3DVolumeTexture9.VTable, @ptrCast(self.vtable)).GetVolumeLevel(@as(*const IDirect3DVolumeTexture9, @ptrCast(self)), Level, ppVolumeLevel);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolumeTexture9_LockBox(self: *const T, Level: u32, pLockedVolume: ?*D3DLOCKED_BOX, pBox: ?*const D3DBOX, Flags: u32) HRESULT {
                return @as(*const IDirect3DVolumeTexture9.VTable, @ptrCast(self.vtable)).LockBox(@as(*const IDirect3DVolumeTexture9, @ptrCast(self)), Level, pLockedVolume, pBox, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolumeTexture9_UnlockBox(self: *const T, Level: u32) HRESULT {
                return @as(*const IDirect3DVolumeTexture9.VTable, @ptrCast(self.vtable)).UnlockBox(@as(*const IDirect3DVolumeTexture9, @ptrCast(self)), Level);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolumeTexture9_AddDirtyBox(self: *const T, pDirtyBox: ?*const D3DBOX) HRESULT {
                return @as(*const IDirect3DVolumeTexture9.VTable, @ptrCast(self.vtable)).AddDirtyBox(@as(*const IDirect3DVolumeTexture9, @ptrCast(self)), pDirtyBox);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DCubeTexture9_Value = Guid.initString("fff32f81-d953-473a-9223-93d652aba93f");
pub const IID_IDirect3DCubeTexture9 = &IID_IDirect3DCubeTexture9_Value;
pub const IDirect3DCubeTexture9 = extern struct {
    pub const VTable = extern struct {
        base: IDirect3DBaseTexture9.VTable,
        GetLevelDesc: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DCubeTexture9,
                Level: u32,
                pDesc: ?*D3DSURFACE_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DCubeTexture9,
                Level: u32,
                pDesc: ?*D3DSURFACE_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetCubeMapSurface: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DCubeTexture9,
                FaceType: D3DCUBEMAP_FACES,
                Level: u32,
                ppCubeMapSurface: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DCubeTexture9,
                FaceType: D3DCUBEMAP_FACES,
                Level: u32,
                ppCubeMapSurface: ?*?*IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        LockRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DCubeTexture9,
                FaceType: D3DCUBEMAP_FACES,
                Level: u32,
                pLockedRect: ?*D3DLOCKED_RECT,
                pRect: ?*const RECT,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DCubeTexture9,
                FaceType: D3DCUBEMAP_FACES,
                Level: u32,
                pLockedRect: ?*D3DLOCKED_RECT,
                pRect: ?*const RECT,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        UnlockRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DCubeTexture9,
                FaceType: D3DCUBEMAP_FACES,
                Level: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DCubeTexture9,
                FaceType: D3DCUBEMAP_FACES,
                Level: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        AddDirtyRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DCubeTexture9,
                FaceType: D3DCUBEMAP_FACES,
                pDirtyRect: ?*const RECT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DCubeTexture9,
                FaceType: D3DCUBEMAP_FACES,
                pDirtyRect: ?*const RECT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IDirect3DBaseTexture9.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DCubeTexture9_GetLevelDesc(self: *const T, Level: u32, pDesc: ?*D3DSURFACE_DESC) HRESULT {
                return @as(*const IDirect3DCubeTexture9.VTable, @ptrCast(self.vtable)).GetLevelDesc(@as(*const IDirect3DCubeTexture9, @ptrCast(self)), Level, pDesc);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DCubeTexture9_GetCubeMapSurface(self: *const T, FaceType: D3DCUBEMAP_FACES, Level: u32, ppCubeMapSurface: ?*?*IDirect3DSurface9) HRESULT {
                return @as(*const IDirect3DCubeTexture9.VTable, @ptrCast(self.vtable)).GetCubeMapSurface(@as(*const IDirect3DCubeTexture9, @ptrCast(self)), FaceType, Level, ppCubeMapSurface);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DCubeTexture9_LockRect(self: *const T, FaceType: D3DCUBEMAP_FACES, Level: u32, pLockedRect: ?*D3DLOCKED_RECT, pRect: ?*const RECT, Flags: u32) HRESULT {
                return @as(*const IDirect3DCubeTexture9.VTable, @ptrCast(self.vtable)).LockRect(@as(*const IDirect3DCubeTexture9, @ptrCast(self)), FaceType, Level, pLockedRect, pRect, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DCubeTexture9_UnlockRect(self: *const T, FaceType: D3DCUBEMAP_FACES, Level: u32) HRESULT {
                return @as(*const IDirect3DCubeTexture9.VTable, @ptrCast(self.vtable)).UnlockRect(@as(*const IDirect3DCubeTexture9, @ptrCast(self)), FaceType, Level);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DCubeTexture9_AddDirtyRect(self: *const T, FaceType: D3DCUBEMAP_FACES, pDirtyRect: ?*const RECT) HRESULT {
                return @as(*const IDirect3DCubeTexture9.VTable, @ptrCast(self.vtable)).AddDirtyRect(@as(*const IDirect3DCubeTexture9, @ptrCast(self)), FaceType, pDirtyRect);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DVertexBuffer9_Value = Guid.initString("b64bb1b5-fd70-4df6-bf91-19d0a12455e3");
pub const IID_IDirect3DVertexBuffer9 = &IID_IDirect3DVertexBuffer9_Value;
pub const IDirect3DVertexBuffer9 = extern struct {
    pub const VTable = extern struct {
        base: IDirect3DResource9.VTable,
        Lock: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVertexBuffer9,
                OffsetToLock: u32,
                SizeToLock: u32,
                ppbData: ?*?*anyopaque,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVertexBuffer9,
                OffsetToLock: u32,
                SizeToLock: u32,
                ppbData: ?*?*anyopaque,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Unlock: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVertexBuffer9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVertexBuffer9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDesc: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVertexBuffer9,
                pDesc: ?*D3DVERTEXBUFFER_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVertexBuffer9,
                pDesc: ?*D3DVERTEXBUFFER_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IDirect3DResource9.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVertexBuffer9_Lock(self: *const T, OffsetToLock: u32, SizeToLock: u32, ppbData: ?*?*anyopaque, Flags: u32) HRESULT {
                return @as(*const IDirect3DVertexBuffer9.VTable, @ptrCast(self.vtable)).Lock(@as(*const IDirect3DVertexBuffer9, @ptrCast(self)), OffsetToLock, SizeToLock, ppbData, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVertexBuffer9_Unlock(self: *const T) HRESULT {
                return @as(*const IDirect3DVertexBuffer9.VTable, @ptrCast(self.vtable)).Unlock(@as(*const IDirect3DVertexBuffer9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVertexBuffer9_GetDesc(self: *const T, pDesc: ?*D3DVERTEXBUFFER_DESC) HRESULT {
                return @as(*const IDirect3DVertexBuffer9.VTable, @ptrCast(self.vtable)).GetDesc(@as(*const IDirect3DVertexBuffer9, @ptrCast(self)), pDesc);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DIndexBuffer9_Value = Guid.initString("7c9dd65e-d3f7-4529-acee-785830acde35");
pub const IID_IDirect3DIndexBuffer9 = &IID_IDirect3DIndexBuffer9_Value;
pub const IDirect3DIndexBuffer9 = extern struct {
    pub const VTable = extern struct {
        base: IDirect3DResource9.VTable,
        Lock: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DIndexBuffer9,
                OffsetToLock: u32,
                SizeToLock: u32,
                ppbData: ?*?*anyopaque,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DIndexBuffer9,
                OffsetToLock: u32,
                SizeToLock: u32,
                ppbData: ?*?*anyopaque,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Unlock: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DIndexBuffer9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DIndexBuffer9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDesc: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DIndexBuffer9,
                pDesc: ?*D3DINDEXBUFFER_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DIndexBuffer9,
                pDesc: ?*D3DINDEXBUFFER_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IDirect3DResource9.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DIndexBuffer9_Lock(self: *const T, OffsetToLock: u32, SizeToLock: u32, ppbData: ?*?*anyopaque, Flags: u32) HRESULT {
                return @as(*const IDirect3DIndexBuffer9.VTable, @ptrCast(self.vtable)).Lock(@as(*const IDirect3DIndexBuffer9, @ptrCast(self)), OffsetToLock, SizeToLock, ppbData, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DIndexBuffer9_Unlock(self: *const T) HRESULT {
                return @as(*const IDirect3DIndexBuffer9.VTable, @ptrCast(self.vtable)).Unlock(@as(*const IDirect3DIndexBuffer9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DIndexBuffer9_GetDesc(self: *const T, pDesc: ?*D3DINDEXBUFFER_DESC) HRESULT {
                return @as(*const IDirect3DIndexBuffer9.VTable, @ptrCast(self.vtable)).GetDesc(@as(*const IDirect3DIndexBuffer9, @ptrCast(self)), pDesc);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DSurface9_Value = Guid.initString("0cfbaf3a-9ff6-429a-99b3-a2796af8b89b");
pub const IID_IDirect3DSurface9 = &IID_IDirect3DSurface9_Value;
pub const IDirect3DSurface9 = extern struct {
    pub const VTable = extern struct {
        base: IDirect3DResource9.VTable,
        GetContainer: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSurface9,
                riid: ?*const Guid,
                ppContainer: ?*?*anyopaque,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSurface9,
                riid: ?*const Guid,
                ppContainer: ?*?*anyopaque,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDesc: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSurface9,
                pDesc: ?*D3DSURFACE_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSurface9,
                pDesc: ?*D3DSURFACE_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        LockRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSurface9,
                pLockedRect: ?*D3DLOCKED_RECT,
                pRect: ?*const RECT,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSurface9,
                pLockedRect: ?*D3DLOCKED_RECT,
                pRect: ?*const RECT,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        UnlockRect: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSurface9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDC: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSurface9,
                phdc: ?*?HDC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSurface9,
                phdc: ?*?HDC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        ReleaseDC: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSurface9,
                hdc: ?HDC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSurface9,
                hdc: ?HDC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IDirect3DResource9.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSurface9_GetContainer(self: *const T, riid: ?*const Guid, ppContainer: ?*?*anyopaque) HRESULT {
                return @as(*const IDirect3DSurface9.VTable, @ptrCast(self.vtable)).GetContainer(@as(*const IDirect3DSurface9, @ptrCast(self)), riid, ppContainer);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSurface9_GetDesc(self: *const T, pDesc: ?*D3DSURFACE_DESC) HRESULT {
                return @as(*const IDirect3DSurface9.VTable, @ptrCast(self.vtable)).GetDesc(@as(*const IDirect3DSurface9, @ptrCast(self)), pDesc);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSurface9_LockRect(self: *const T, pLockedRect: ?*D3DLOCKED_RECT, pRect: ?*const RECT, Flags: u32) HRESULT {
                return @as(*const IDirect3DSurface9.VTable, @ptrCast(self.vtable)).LockRect(@as(*const IDirect3DSurface9, @ptrCast(self)), pLockedRect, pRect, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSurface9_UnlockRect(self: *const T) HRESULT {
                return @as(*const IDirect3DSurface9.VTable, @ptrCast(self.vtable)).UnlockRect(@as(*const IDirect3DSurface9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSurface9_GetDC(self: *const T, phdc: ?*?HDC) HRESULT {
                return @as(*const IDirect3DSurface9.VTable, @ptrCast(self.vtable)).GetDC(@as(*const IDirect3DSurface9, @ptrCast(self)), phdc);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSurface9_ReleaseDC(self: *const T, hdc: ?HDC) HRESULT {
                return @as(*const IDirect3DSurface9.VTable, @ptrCast(self.vtable)).ReleaseDC(@as(*const IDirect3DSurface9, @ptrCast(self)), hdc);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DVolume9_Value = Guid.initString("24f416e6-1f67-4aa7-b88e-d33f6f3128a1");
pub const IID_IDirect3DVolume9 = &IID_IDirect3DVolume9_Value;
pub const IDirect3DVolume9 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolume9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolume9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetPrivateData: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolume9,
                refguid: ?*const Guid,
                pData: ?*const anyopaque,
                SizeOfData: u32,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolume9,
                refguid: ?*const Guid,
                pData: ?*const anyopaque,
                SizeOfData: u32,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetPrivateData: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolume9,
                refguid: ?*const Guid,
                pData: ?*anyopaque,
                pSizeOfData: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolume9,
                refguid: ?*const Guid,
                pData: ?*anyopaque,
                pSizeOfData: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        FreePrivateData: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolume9,
                refguid: ?*const Guid,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolume9,
                refguid: ?*const Guid,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetContainer: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolume9,
                riid: ?*const Guid,
                ppContainer: ?*?*anyopaque,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolume9,
                riid: ?*const Guid,
                ppContainer: ?*?*anyopaque,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDesc: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolume9,
                pDesc: ?*D3DVOLUME_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolume9,
                pDesc: ?*D3DVOLUME_DESC,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        LockBox: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolume9,
                pLockedVolume: ?*D3DLOCKED_BOX,
                pBox: ?*const D3DBOX,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolume9,
                pLockedVolume: ?*D3DLOCKED_BOX,
                pBox: ?*const D3DBOX,
                Flags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        UnlockBox: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DVolume9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DVolume9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolume9_GetDevice(self: *const T, ppDevice: ?*?*IDirect3DDevice9) HRESULT {
                return @as(*const IDirect3DVolume9.VTable, @ptrCast(self.vtable)).GetDevice(@as(*const IDirect3DVolume9, @ptrCast(self)), ppDevice);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolume9_SetPrivateData(self: *const T, refguid: ?*const Guid, pData: ?*const anyopaque, SizeOfData: u32, Flags: u32) HRESULT {
                return @as(*const IDirect3DVolume9.VTable, @ptrCast(self.vtable)).SetPrivateData(@as(*const IDirect3DVolume9, @ptrCast(self)), refguid, pData, SizeOfData, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolume9_GetPrivateData(self: *const T, refguid: ?*const Guid, pData: ?*anyopaque, pSizeOfData: ?*u32) HRESULT {
                return @as(*const IDirect3DVolume9.VTable, @ptrCast(self.vtable)).GetPrivateData(@as(*const IDirect3DVolume9, @ptrCast(self)), refguid, pData, pSizeOfData);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolume9_FreePrivateData(self: *const T, refguid: ?*const Guid) HRESULT {
                return @as(*const IDirect3DVolume9.VTable, @ptrCast(self.vtable)).FreePrivateData(@as(*const IDirect3DVolume9, @ptrCast(self)), refguid);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolume9_GetContainer(self: *const T, riid: ?*const Guid, ppContainer: ?*?*anyopaque) HRESULT {
                return @as(*const IDirect3DVolume9.VTable, @ptrCast(self.vtable)).GetContainer(@as(*const IDirect3DVolume9, @ptrCast(self)), riid, ppContainer);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolume9_GetDesc(self: *const T, pDesc: ?*D3DVOLUME_DESC) HRESULT {
                return @as(*const IDirect3DVolume9.VTable, @ptrCast(self.vtable)).GetDesc(@as(*const IDirect3DVolume9, @ptrCast(self)), pDesc);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolume9_LockBox(self: *const T, pLockedVolume: ?*D3DLOCKED_BOX, pBox: ?*const D3DBOX, Flags: u32) HRESULT {
                return @as(*const IDirect3DVolume9.VTable, @ptrCast(self.vtable)).LockBox(@as(*const IDirect3DVolume9, @ptrCast(self)), pLockedVolume, pBox, Flags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DVolume9_UnlockBox(self: *const T) HRESULT {
                return @as(*const IDirect3DVolume9.VTable, @ptrCast(self.vtable)).UnlockBox(@as(*const IDirect3DVolume9, @ptrCast(self)));
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DQuery9_Value = Guid.initString("d9771460-a695-4f26-bbd3-27b840b541cc");
pub const IID_IDirect3DQuery9 = &IID_IDirect3DQuery9_Value;
pub const IDirect3DQuery9 = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetDevice: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DQuery9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DQuery9,
                ppDevice: ?*?*IDirect3DDevice9,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetType: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DQuery9,
            ) callconv(@import("std").os.windows.WINAPI) D3DQUERYTYPE,
            else => *const fn (
                self: *const IDirect3DQuery9,
            ) callconv(@import("std").os.windows.WINAPI) D3DQUERYTYPE,
        },
        GetDataSize: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DQuery9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3DQuery9,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        Issue: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DQuery9,
                dwIssueFlags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DQuery9,
                dwIssueFlags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetData: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DQuery9,
                pData: ?*anyopaque,
                dwSize: u32,
                dwGetDataFlags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DQuery9,
                pData: ?*anyopaque,
                dwSize: u32,
                dwGetDataFlags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DQuery9_GetDevice(self: *const T, ppDevice: ?*?*IDirect3DDevice9) HRESULT {
                return @as(*const IDirect3DQuery9.VTable, @ptrCast(self.vtable)).GetDevice(@as(*const IDirect3DQuery9, @ptrCast(self)), ppDevice);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DQuery9_GetType(self: *const T) D3DQUERYTYPE {
                return @as(*const IDirect3DQuery9.VTable, @ptrCast(self.vtable)).GetType(@as(*const IDirect3DQuery9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DQuery9_GetDataSize(self: *const T) u32 {
                return @as(*const IDirect3DQuery9.VTable, @ptrCast(self.vtable)).GetDataSize(@as(*const IDirect3DQuery9, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DQuery9_Issue(self: *const T, dwIssueFlags: u32) HRESULT {
                return @as(*const IDirect3DQuery9.VTable, @ptrCast(self.vtable)).Issue(@as(*const IDirect3DQuery9, @ptrCast(self)), dwIssueFlags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DQuery9_GetData(self: *const T, pData: ?*anyopaque, dwSize: u32, dwGetDataFlags: u32) HRESULT {
                return @as(*const IDirect3DQuery9.VTable, @ptrCast(self.vtable)).GetData(@as(*const IDirect3DQuery9, @ptrCast(self)), pData, dwSize, dwGetDataFlags);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3D9Ex_Value = Guid.initString("02177241-69fc-400c-8ff1-93a44df6861d");
pub const IID_IDirect3D9Ex = &IID_IDirect3D9Ex_Value;
pub const IDirect3D9Ex = extern struct {
    pub const VTable = extern struct {
        base: IDirect3D9.VTable,
        GetAdapterModeCountEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9Ex,
                Adapter: u32,
                pFilter: ?*const D3DDISPLAYMODEFILTER,
            ) callconv(@import("std").os.windows.WINAPI) u32,
            else => *const fn (
                self: *const IDirect3D9Ex,
                Adapter: u32,
                pFilter: ?*const D3DDISPLAYMODEFILTER,
            ) callconv(@import("std").os.windows.WINAPI) u32,
        },
        EnumAdapterModesEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9Ex,
                Adapter: u32,
                pFilter: ?*const D3DDISPLAYMODEFILTER,
                Mode: u32,
                pMode: ?*D3DDISPLAYMODEEX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9Ex,
                Adapter: u32,
                pFilter: ?*const D3DDISPLAYMODEFILTER,
                Mode: u32,
                pMode: ?*D3DDISPLAYMODEEX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetAdapterDisplayModeEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9Ex,
                Adapter: u32,
                pMode: ?*D3DDISPLAYMODEEX,
                pRotation: ?*D3DDISPLAYROTATION,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9Ex,
                Adapter: u32,
                pMode: ?*D3DDISPLAYMODEEX,
                pRotation: ?*D3DDISPLAYROTATION,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateDeviceEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9Ex,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                hFocusWindow: ?HWND,
                BehaviorFlags: u32,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
                pFullscreenDisplayMode: ?*D3DDISPLAYMODEEX,
                ppReturnedDeviceInterface: ?*?*IDirect3DDevice9Ex,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9Ex,
                Adapter: u32,
                DeviceType: D3DDEVTYPE,
                hFocusWindow: ?HWND,
                BehaviorFlags: u32,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
                pFullscreenDisplayMode: ?*D3DDISPLAYMODEEX,
                ppReturnedDeviceInterface: ?*?*IDirect3DDevice9Ex,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetAdapterLUID: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3D9Ex,
                Adapter: u32,
                pLUID: ?*LUID,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3D9Ex,
                Adapter: u32,
                pLUID: ?*LUID,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IDirect3D9.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9Ex_GetAdapterModeCountEx(self: *const T, Adapter: u32, pFilter: ?*const D3DDISPLAYMODEFILTER) u32 {
                return @as(*const IDirect3D9Ex.VTable, @ptrCast(self.vtable)).GetAdapterModeCountEx(@as(*const IDirect3D9Ex, @ptrCast(self)), Adapter, pFilter);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9Ex_EnumAdapterModesEx(self: *const T, Adapter: u32, pFilter: ?*const D3DDISPLAYMODEFILTER, Mode: u32, pMode: ?*D3DDISPLAYMODEEX) HRESULT {
                return @as(*const IDirect3D9Ex.VTable, @ptrCast(self.vtable)).EnumAdapterModesEx(@as(*const IDirect3D9Ex, @ptrCast(self)), Adapter, pFilter, Mode, pMode);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9Ex_GetAdapterDisplayModeEx(self: *const T, Adapter: u32, pMode: ?*D3DDISPLAYMODEEX, pRotation: ?*D3DDISPLAYROTATION) HRESULT {
                return @as(*const IDirect3D9Ex.VTable, @ptrCast(self.vtable)).GetAdapterDisplayModeEx(@as(*const IDirect3D9Ex, @ptrCast(self)), Adapter, pMode, pRotation);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9Ex_CreateDeviceEx(self: *const T, Adapter: u32, DeviceType: D3DDEVTYPE, hFocusWindow: ?HWND, BehaviorFlags: u32, pPresentationParameters: ?*D3DPRESENT_PARAMETERS, pFullscreenDisplayMode: ?*D3DDISPLAYMODEEX, ppReturnedDeviceInterface: ?*?*IDirect3DDevice9Ex) HRESULT {
                return @as(*const IDirect3D9Ex.VTable, @ptrCast(self.vtable)).CreateDeviceEx(@as(*const IDirect3D9Ex, @ptrCast(self)), Adapter, DeviceType, hFocusWindow, BehaviorFlags, pPresentationParameters, pFullscreenDisplayMode, ppReturnedDeviceInterface);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3D9Ex_GetAdapterLUID(self: *const T, Adapter: u32, pLUID: ?*LUID) HRESULT {
                return @as(*const IDirect3D9Ex.VTable, @ptrCast(self.vtable)).GetAdapterLUID(@as(*const IDirect3D9Ex, @ptrCast(self)), Adapter, pLUID);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DDevice9Ex_Value = Guid.initString("b18b10ce-2649-405a-870f-95f777d4313a");
pub const IID_IDirect3DDevice9Ex = &IID_IDirect3DDevice9Ex_Value;
pub const IDirect3DDevice9Ex = extern struct {
    pub const VTable = extern struct {
        base: IDirect3DDevice9.VTable,
        SetConvolutionMonoKernel: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                width: u32,
                height: u32,
                rows: ?*f32,
                columns: ?*f32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                width: u32,
                height: u32,
                rows: ?*f32,
                columns: ?*f32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        ComposeRects: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                pSrc: ?*IDirect3DSurface9,
                pDst: ?*IDirect3DSurface9,
                pSrcRectDescs: ?*IDirect3DVertexBuffer9,
                NumRects: u32,
                pDstRectDescs: ?*IDirect3DVertexBuffer9,
                Operation: D3DCOMPOSERECTSOP,
                Xoffset: i32,
                Yoffset: i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                pSrc: ?*IDirect3DSurface9,
                pDst: ?*IDirect3DSurface9,
                pSrcRectDescs: ?*IDirect3DVertexBuffer9,
                NumRects: u32,
                pDstRectDescs: ?*IDirect3DVertexBuffer9,
                Operation: D3DCOMPOSERECTSOP,
                Xoffset: i32,
                Yoffset: i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        PresentEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                pSourceRect: ?*const RECT,
                pDestRect: ?*const RECT,
                hDestWindowOverride: ?HWND,
                pDirtyRegion: ?*const RGNDATA,
                dwFlags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                pSourceRect: ?*const RECT,
                pDestRect: ?*const RECT,
                hDestWindowOverride: ?HWND,
                pDirtyRegion: ?*const RGNDATA,
                dwFlags: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetGPUThreadPriority: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                pPriority: ?*i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                pPriority: ?*i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetGPUThreadPriority: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                Priority: i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                Priority: i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        WaitForVBlank: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                iSwapChain: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                iSwapChain: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CheckResourceResidency: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                pResourceArray: ?*?*IDirect3DResource9,
                NumResources: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                pResourceArray: ?*?*IDirect3DResource9,
                NumResources: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetMaximumFrameLatency: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                MaxLatency: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                MaxLatency: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetMaximumFrameLatency: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                pMaxLatency: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                pMaxLatency: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CheckDeviceState: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                hDestinationWindow: ?HWND,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                hDestinationWindow: ?HWND,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateRenderTargetEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                MultiSample: D3DMULTISAMPLE_TYPE,
                MultisampleQuality: u32,
                Lockable: BOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
                Usage: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                MultiSample: D3DMULTISAMPLE_TYPE,
                MultisampleQuality: u32,
                Lockable: BOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
                Usage: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateOffscreenPlainSurfaceEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
                Usage: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                Pool: D3DPOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
                Usage: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        CreateDepthStencilSurfaceEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                MultiSample: D3DMULTISAMPLE_TYPE,
                MultisampleQuality: u32,
                Discard: BOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
                Usage: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                Width: u32,
                Height: u32,
                Format: D3DFORMAT,
                MultiSample: D3DMULTISAMPLE_TYPE,
                MultisampleQuality: u32,
                Discard: BOOL,
                ppSurface: ?*?*IDirect3DSurface9,
                pSharedHandle: ?*?HANDLE,
                Usage: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        ResetEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
                pFullscreenDisplayMode: ?*D3DDISPLAYMODEEX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                pPresentationParameters: ?*D3DPRESENT_PARAMETERS,
                pFullscreenDisplayMode: ?*D3DDISPLAYMODEEX,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDisplayModeEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DDevice9Ex,
                iSwapChain: u32,
                pMode: ?*D3DDISPLAYMODEEX,
                pRotation: ?*D3DDISPLAYROTATION,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DDevice9Ex,
                iSwapChain: u32,
                pMode: ?*D3DDISPLAYMODEEX,
                pRotation: ?*D3DDISPLAYROTATION,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IDirect3DDevice9.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_SetConvolutionMonoKernel(self: *const T, width: u32, height: u32, rows: ?*f32, columns: ?*f32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).SetConvolutionMonoKernel(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), width, height, rows, columns);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_ComposeRects(self: *const T, pSrc: ?*IDirect3DSurface9, pDst: ?*IDirect3DSurface9, pSrcRectDescs: ?*IDirect3DVertexBuffer9, NumRects: u32, pDstRectDescs: ?*IDirect3DVertexBuffer9, Operation: D3DCOMPOSERECTSOP, Xoffset: i32, Yoffset: i32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).ComposeRects(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), pSrc, pDst, pSrcRectDescs, NumRects, pDstRectDescs, Operation, Xoffset, Yoffset);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_PresentEx(self: *const T, pSourceRect: ?*const RECT, pDestRect: ?*const RECT, hDestWindowOverride: ?HWND, pDirtyRegion: ?*const RGNDATA, dwFlags: u32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).PresentEx(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_GetGPUThreadPriority(self: *const T, pPriority: ?*i32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).GetGPUThreadPriority(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), pPriority);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_SetGPUThreadPriority(self: *const T, Priority: i32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).SetGPUThreadPriority(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), Priority);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_WaitForVBlank(self: *const T, iSwapChain: u32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).WaitForVBlank(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), iSwapChain);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_CheckResourceResidency(self: *const T, pResourceArray: ?*?*IDirect3DResource9, NumResources: u32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).CheckResourceResidency(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), pResourceArray, NumResources);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_SetMaximumFrameLatency(self: *const T, MaxLatency: u32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).SetMaximumFrameLatency(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), MaxLatency);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_GetMaximumFrameLatency(self: *const T, pMaxLatency: ?*u32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).GetMaximumFrameLatency(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), pMaxLatency);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_CheckDeviceState(self: *const T, hDestinationWindow: ?HWND) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).CheckDeviceState(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), hDestinationWindow);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_CreateRenderTargetEx(self: *const T, Width: u32, Height: u32, Format: D3DFORMAT, MultiSample: D3DMULTISAMPLE_TYPE, MultisampleQuality: u32, Lockable: BOOL, ppSurface: ?*?*IDirect3DSurface9, pSharedHandle: ?*?HANDLE, Usage: u32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).CreateRenderTargetEx(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), Width, Height, Format, MultiSample, MultisampleQuality, Lockable, ppSurface, pSharedHandle, Usage);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_CreateOffscreenPlainSurfaceEx(self: *const T, Width: u32, Height: u32, Format: D3DFORMAT, Pool: D3DPOOL, ppSurface: ?*?*IDirect3DSurface9, pSharedHandle: ?*?HANDLE, Usage: u32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).CreateOffscreenPlainSurfaceEx(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), Width, Height, Format, Pool, ppSurface, pSharedHandle, Usage);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_CreateDepthStencilSurfaceEx(self: *const T, Width: u32, Height: u32, Format: D3DFORMAT, MultiSample: D3DMULTISAMPLE_TYPE, MultisampleQuality: u32, Discard: BOOL, ppSurface: ?*?*IDirect3DSurface9, pSharedHandle: ?*?HANDLE, Usage: u32) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).CreateDepthStencilSurfaceEx(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), Width, Height, Format, MultiSample, MultisampleQuality, Discard, ppSurface, pSharedHandle, Usage);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_ResetEx(self: *const T, pPresentationParameters: ?*D3DPRESENT_PARAMETERS, pFullscreenDisplayMode: ?*D3DDISPLAYMODEEX) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).ResetEx(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), pPresentationParameters, pFullscreenDisplayMode);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DDevice9Ex_GetDisplayModeEx(self: *const T, iSwapChain: u32, pMode: ?*D3DDISPLAYMODEEX, pRotation: ?*D3DDISPLAYROTATION) HRESULT {
                return @as(*const IDirect3DDevice9Ex.VTable, @ptrCast(self.vtable)).GetDisplayModeEx(@as(*const IDirect3DDevice9Ex, @ptrCast(self)), iSwapChain, pMode, pRotation);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

const IID_IDirect3DSwapChain9Ex_Value = Guid.initString("91886caf-1c3d-4d2e-a0ab-3e4c7d8d3303");
pub const IID_IDirect3DSwapChain9Ex = &IID_IDirect3DSwapChain9Ex_Value;
pub const IDirect3DSwapChain9Ex = extern struct {
    pub const VTable = extern struct {
        base: IDirect3DSwapChain9.VTable,
        GetLastPresentCount: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSwapChain9Ex,
                pLastPresentCount: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSwapChain9Ex,
                pLastPresentCount: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetPresentStats: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSwapChain9Ex,
                pPresentationStatistics: ?*D3DPRESENTSTATS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSwapChain9Ex,
                pPresentationStatistics: ?*D3DPRESENTSTATS,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetDisplayModeEx: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IDirect3DSwapChain9Ex,
                pMode: ?*D3DDISPLAYMODEEX,
                pRotation: ?*D3DDISPLAYROTATION,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IDirect3DSwapChain9Ex,
                pMode: ?*D3DDISPLAYMODEEX,
                pRotation: ?*D3DDISPLAYROTATION,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IDirect3DSwapChain9.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSwapChain9Ex_GetLastPresentCount(self: *const T, pLastPresentCount: ?*u32) HRESULT {
                return @as(*const IDirect3DSwapChain9Ex.VTable, @ptrCast(self.vtable)).GetLastPresentCount(@as(*const IDirect3DSwapChain9Ex, @ptrCast(self)), pLastPresentCount);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSwapChain9Ex_GetPresentStats(self: *const T, pPresentationStatistics: ?*D3DPRESENTSTATS) HRESULT {
                return @as(*const IDirect3DSwapChain9Ex.VTable, @ptrCast(self.vtable)).GetPresentStats(@as(*const IDirect3DSwapChain9Ex, @ptrCast(self)), pPresentationStatistics);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IDirect3DSwapChain9Ex_GetDisplayModeEx(self: *const T, pMode: ?*D3DDISPLAYMODEEX, pRotation: ?*D3DDISPLAYROTATION) HRESULT {
                return @as(*const IDirect3DSwapChain9Ex.VTable, @ptrCast(self.vtable)).GetDisplayModeEx(@as(*const IDirect3DSwapChain9Ex, @ptrCast(self)), pMode, pRotation);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

pub const D3DADAPTER_IDENTIFIER9 = switch (@import("../zig.zig").arch) {
    .X64, .Arm64 => extern struct {
        Driver: [512]CHAR,
        Description: [512]CHAR,
        DeviceName: [32]CHAR,
        DriverVersion: LARGE_INTEGER,
        VendorId: u32,
        DeviceId: u32,
        SubSysId: u32,
        Revision: u32,
        DeviceIdentifier: Guid,
        WHQLLevel: u32,
    },
    .X86 => extern struct {
        Driver: [512]CHAR align(4),
        Description: [512]CHAR align(4),
        DeviceName: [32]CHAR align(4),
        DriverVersion: LARGE_INTEGER align(4),
        VendorId: u32 align(4),
        DeviceId: u32 align(4),
        SubSysId: u32 align(4),
        Revision: u32 align(4),
        DeviceIdentifier: Guid align(4),
        WHQLLevel: u32 align(4),
    },
};
pub const D3DMEMORYPRESSURE = switch (@import("../zig.zig").arch) {
    .X64, .Arm64 => extern struct {
        BytesEvictedFromProcess: u64,
        SizeOfInefficientAllocation: u64,
        LevelOfEfficiency: u32,
    },
    .X86 => extern struct {
        BytesEvictedFromProcess: u64 align(4),
        SizeOfInefficientAllocation: u64 align(4),
        LevelOfEfficiency: u32 align(4),
    },
};
pub const D3DPRESENTSTATS = switch (@import("../zig.zig").arch) {
    .X64, .Arm64 => extern struct {
        PresentCount: u32,
        PresentRefreshCount: u32,
        SyncRefreshCount: u32,
        SyncQPCTime: LARGE_INTEGER,
        SyncGPUTime: LARGE_INTEGER,
    },
    .X86 => extern struct {
        PresentCount: u32 align(4),
        PresentRefreshCount: u32 align(4),
        SyncRefreshCount: u32 align(4),
        SyncQPCTime: LARGE_INTEGER align(4),
        SyncGPUTime: LARGE_INTEGER align(4),
    },
};
pub const D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_OUTPUT = switch (@import("../zig.zig").arch) {
    .X64, .Arm64 => extern struct {
        Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT,
        DeviceHandle: ?HANDLE,
        CryptoSessionHandle: ?HANDLE,
        OutputIDIndex: u32,
        OutputID: u64,
    },
    .X86 => extern struct {
        Output: D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT align(4),
        DeviceHandle: ?HANDLE align(4),
        CryptoSessionHandle: ?HANDLE align(4),
        OutputIDIndex: u32 align(4),
        OutputID: u64 align(4),
    },
};
pub const D3DAES_CTR_IV = switch (@import("../zig.zig").arch) {
    .X64, .Arm64 => extern struct {
        IV: u64,
        Count: u64,
    },
    .X86 => extern struct {
        IV: u64 align(4),
        Count: u64 align(4),
    },
};

//--------------------------------------------------------------------------------
// Section: Functions (9)
//--------------------------------------------------------------------------------
pub extern "d3d9" fn Direct3DCreate9(
    SDKVersion: u32,
) callconv(@import("std").os.windows.WINAPI) ?*IDirect3D9;

pub extern "d3d9" fn D3DPERF_BeginEvent(
    col: u32,
    wszName: ?[*:0]const u16,
) callconv(@import("std").os.windows.WINAPI) i32;

pub extern "d3d9" fn D3DPERF_EndEvent() callconv(@import("std").os.windows.WINAPI) i32;

pub extern "d3d9" fn D3DPERF_SetMarker(
    col: u32,
    wszName: ?[*:0]const u16,
) callconv(@import("std").os.windows.WINAPI) void;

pub extern "d3d9" fn D3DPERF_SetRegion(
    col: u32,
    wszName: ?[*:0]const u16,
) callconv(@import("std").os.windows.WINAPI) void;

pub extern "d3d9" fn D3DPERF_QueryRepeatFrame() callconv(@import("std").os.windows.WINAPI) BOOL;

pub extern "d3d9" fn D3DPERF_SetOptions(
    dwOptions: u32,
) callconv(@import("std").os.windows.WINAPI) void;

pub extern "d3d9" fn D3DPERF_GetStatus() callconv(@import("std").os.windows.WINAPI) u32;

pub extern "d3d9" fn Direct3DCreate9Ex(
    SDKVersion: u32,
    param1: ?*?*IDirect3D9Ex,
) callconv(@import("std").os.windows.WINAPI) HRESULT;

//--------------------------------------------------------------------------------
// Section: Unicode Aliases (0)
//--------------------------------------------------------------------------------
const thismodule = @This();
pub usingnamespace switch (@import("../zig.zig").unicode_mode) {
    .ansi => struct {},
    .wide => struct {},
    .unspecified => if (@import("builtin").is_test) struct {} else struct {},
};
//--------------------------------------------------------------------------------
// Section: Imports (18)
//--------------------------------------------------------------------------------
const Guid = @import("../zig.zig").Guid;
const BOOL = @import("../foundation.zig").BOOL;
const CHAR = @import("../foundation.zig").CHAR;
const D3DMATRIX = @import("../graphics/direct3d.zig").D3DMATRIX;
const D3DVECTOR = @import("../graphics/direct3d.zig").D3DVECTOR;
const HANDLE = @import("../foundation.zig").HANDLE;
const HDC = @import("../graphics/gdi.zig").HDC;
const HMONITOR = @import("../graphics/gdi.zig").HMONITOR;
const HRESULT = @import("../foundation.zig").HRESULT;
const HWND = @import("../foundation.zig").HWND;
const IUnknown = @import("../system/com.zig").IUnknown;
const LARGE_INTEGER = @import("../foundation.zig").LARGE_INTEGER;
const LUID = @import("../foundation.zig").LUID;
const PALETTEENTRY = @import("../graphics/gdi.zig").PALETTEENTRY;
const POINT = @import("../foundation.zig").POINT;
const PWSTR = @import("../foundation.zig").PWSTR;
const RECT = @import("../foundation.zig").RECT;
const RGNDATA = @import("../graphics/gdi.zig").RGNDATA;

test {
    @setEvalBranchQuota(comptime @import("std").meta.declarations(@This()).len * 3);

    // reference all the pub declarations
    if (!@import("builtin").is_test) return;
    inline for (comptime @import("std").meta.declarations(@This())) |decl| {
        if (decl.is_pub) {
            _ = @field(@This(), decl.name);
        }
    }
}
