www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - D3D Test app - Please try (especially if nonagon didn't work for you)

reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
http://www.mtwirefree.net/kbilling/d3d%20test.zip

This is a small app that will attempt to create a Direct3D device using 
hardware vertex processing, and if that's not available, software vertex 
processing.  I'm hoping that this will maybe solve the problem last time 
nonagon was released, when some people were not able to run the program.

Please reply, and tell me the following things:

- What the message box said
- Your video card and how much memory it has

Thanks for your help.  Hopefully this fixes the problem, and if it doesn't, 
I'll have to try something else.

Thanks to Maxime Larose for contacting me through email about this and 
testing some things for me. 
Jun 11 2005
next sibling parent reply clayasaurus <clayasaurus gmail.com> writes:
Jarrett Billingsley wrote:
 http://www.mtwirefree.net/kbilling/d3d%20test.zip
 
 This is a small app that will attempt to create a Direct3D device using 
 hardware vertex processing, and if that's not available, software vertex 
 processing.  I'm hoping that this will maybe solve the problem last time 
 nonagon was released, when some people were not able to run the program.
 
 Please reply, and tell me the following things:
 
 - What the message box said
 - Your video card and how much memory it has
 
 Thanks for your help.  Hopefully this fixes the problem, and if it doesn't, 
 I'll have to try something else.
 
 Thanks to Maxime Larose for contacting me through email about this and 
 testing some things for me. 
 
 

Probably does't matter, but I tried running it under wine on linux and the message box said... ("Startup Error")"Wrong Win32s version, or damaged installation. This application requires Win32s version 1.15 to be loaded on your system" I don't know if you coded that in or if it is a microsoft thing.
Jun 11 2005
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"clayasaurus" <clayasaurus gmail.com> wrote in message 
news:d8f3s9$oep$1 digitaldaemon.com...
 Probably does't matter, but I tried running it under wine on linux and the 
 message box said...

 ("Startup Error")"Wrong Win32s version, or damaged installation. This 
 application requires Win32s version 1.15 to be loaded on your system"

 I don't know if you coded that in or if it is a microsoft thing.

Nope, I didn't put that in :)
Jun 11 2005
prev sibling next sibling parent reply Nate <plummn comdel.net> writes:
I get a messagebox:
"Success!
HW VP Works!"

It then immediately closes.

Where did you get the dx9 bindings if I may ask.. on dsource it just 
prompts for a password over and over (for bindings) unlike all the other 
projects.

I tried to reach them but www at dsource d0t org does not work so I 
cannot report it, any idea how to reach them?

Jarrett Billingsley wrote:
 http://www.mtwirefree.net/kbilling/d3d%20test.zip
 
 This is a small app that will attempt to create a Direct3D device using 
 hardware vertex processing, and if that's not available, software vertex 
 processing.  I'm hoping that this will maybe solve the problem last time 
 nonagon was released, when some people were not able to run the program.
 
 Please reply, and tell me the following things:
 
 - What the message box said
 - Your video card and how much memory it has
 
 Thanks for your help.  Hopefully this fixes the problem, and if it doesn't, 
 I'll have to try something else.
 
 Thanks to Maxime Larose for contacting me through email about this and 
 testing some things for me. 
 
 

Jun 11 2005
next sibling parent reply clayasaurus <clayasaurus gmail.com> writes:
Nate wrote:
 I get a messagebox:
 "Success!
 HW VP Works!"
 
 It then immediately closes.
 
 Where did you get the dx9 bindings if I may ask.. on dsource it just 
 prompts for a password over and over (for bindings) unlike all the other 
 projects.
 
 I tried to reach them but www at dsource d0t org does not work so I 
 cannot report it, any idea how to reach them?

tried http://svn.dsource.org/projects/bindings/trunk/d3d9.d ?
 
 Jarrett Billingsley wrote:
 
 http://www.mtwirefree.net/kbilling/d3d%20test.zip

 This is a small app that will attempt to create a Direct3D device 
 using hardware vertex processing, and if that's not available, 
 software vertex processing.  I'm hoping that this will maybe solve the 
 problem last time nonagon was released, when some people were not able 
 to run the program.

 Please reply, and tell me the following things:

 - What the message box said
 - Your video card and how much memory it has

 Thanks for your help.  Hopefully this fixes the problem, and if it 
 doesn't, I'll have to try something else.

 Thanks to Maxime Larose for contacting me through email about this and 
 testing some things for me.


Jun 11 2005
parent reply clayasaurus <clayasaurus gmail.com> writes:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

clayasaurus wrote:
 Nate wrote:
 
 I get a messagebox:
 "Success!
 HW VP Works!"

 It then immediately closes.

 Where did you get the dx9 bindings if I may ask.. on dsource it just 
 prompts for a password over and over (for bindings) unlike all the 
 other projects.

 I tried to reach them but www at dsource d0t org does not work so I 
 cannot report it, any idea how to reach them?

tried http://svn.dsource.org/projects/bindings/trunk/d3d9.d ?

nevermind, here you go. This is the one from the bindings project.
 
 Jarrett Billingsley wrote:

 http://www.mtwirefree.net/kbilling/d3d%20test.zip

 This is a small app that will attempt to create a Direct3D device 
 using hardware vertex processing, and if that's not available, 
 software vertex processing.  I'm hoping that this will maybe solve 
 the problem last time nonagon was released, when some people were not 
 able to run the program.

 Please reply, and tell me the following things:

 - What the message box said
 - Your video card and how much memory it has

 Thanks for your help.  Hopefully this fixes the problem, and if it 
 doesn't, I'll have to try something else.

 Thanks to Maxime Larose for contacting me through email about this 
 and testing some things for me.



Jun 11 2005
parent reply Nate <plummn comdel.net> writes:
Thank you for attaching that. The url 
(http://svn.dsource.org/projects/bindings/trunk/d3d9.d) just prompts me 
for a password, is it just me?

clayasaurus wrote:
 clayasaurus wrote:
 Nate wrote:

 I get a messagebox:
 "Success!
 HW VP Works!"

 It then immediately closes.

 Where did you get the dx9 bindings if I may ask.. on dsource it just 
 prompts for a password over and over (for bindings) unlike all the 
 other projects.

 I tried to reach them but www at dsource d0t org does not work so I 
 cannot report it, any idea how to reach them?

tried http://svn.dsource.org/projects/bindings/trunk/d3d9.d ?

nevermind, here you go. This is the one from the bindings project.
 Jarrett Billingsley wrote:

 http://www.mtwirefree.net/kbilling/d3d%20test.zip

 This is a small app that will attempt to create a Direct3D device 
 using hardware vertex processing, and if that's not available, 
 software vertex processing.  I'm hoping that this will maybe solve 
 the problem last time nonagon was released, when some people were 
 not able to run the program.

 Please reply, and tell me the following things:

 - What the message box said
 - Your video card and how much memory it has

 Thanks for your help.  Hopefully this fixes the problem, and if it 
 doesn't, I'll have to try something else.

 Thanks to Maxime Larose for contacting me through email about this 
 and testing some things for me.



------------------------------------------------------------------------ /* D3D9 - D bindings for Direct3D 9 Copyright (C) 2004 James Lacey Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument. DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. */ module d3d9; private import std.c.windows.windows; private import std.string; private import std.c.windows.com; alias HANDLE HMONITOR; alias GUID* REFGUID; alias DWORD D3DCOLOR; alias IID* REFIID; alias IDirect3D9* LPDIRECT3D9; alias IDirect3D9* PDIRECT3D9; alias IDirect3DBaseTexture9* LPDIRECT3DBASETEXTURE9; alias IDirect3DBaseTexture9* PDIRECT3DBASETEXTURE9; alias IDirect3DCubeTexture9* LPDIRECT3DCUBETEXTURE9; alias IDirect3DCubeTexture9* PDIRECT3DCUBETEXTURE9; alias IDirect3DDevice9* LPDIRECT3DDEVICE9; alias IDirect3DDevice9* PDIRECT3DDEVICE9; alias IDirect3DIndexBuffer9* LPDIRECT3DINDEXBUFFER9; alias IDirect3DIndexBuffer9* PDIRECT3DINDEXBUFFER9; alias IDirect3DPixelShader9* LPDIRECT3DPIXELSHADER9; alias IDirect3DPixelShader9* PDIRECT3DPIXELSHADER9; alias IDirect3DQuery9* LPDIRECT3DQUERY9; alias IDirect3DQuery9* PDIRECT3DQUERY9; alias IDirect3DResource9* LPDIRECT3DRESOURCE9; alias IDirect3DResource9* PDIRECT3DRESOURCE9; alias IDirect3DStateBlock9* LPDIRECT3DSTATEBLOCK9; alias IDirect3DStateBlock9* PDIRECT3DSTATEBLOCK9; alias IDirect3DSurface9* LPDIRECT3DSURFACE9; alias IDirect3DSurface9* PDIRECT3DSURFACE9; alias IDirect3DSwapChain9* LPDIRECT3DSWAPCHAIN9; alias IDirect3DSwapChain9* PDIRECT3DSWAPCHAIN9; alias IDirect3DTexture9* LPDIRECT3DTEXTURE9; alias IDirect3DTexture9* PDIRECT3DTEXTURE9; alias IDirect3DVertexBuffer9* LPDIRECT3DVERTEXBUFFER9; alias IDirect3DVertexBuffer9* PDIRECT3DVERTEXBUFFER9; alias IDirect3DVertexDeclaration9* LPDIRECT3DVERTEXDECLARATION9; alias IDirect3DVertexDeclaration9* PDIRECT3DVERTEXDECLARATION9; alias IDirect3DVertexShader9* LPDIRECT3DVERTEXSHADER9; alias IDirect3DVertexShader9* PDIRECT3DVERTEXSHADER9; alias IDirect3DVolume9* LPDIRECT3DVOLUME9; alias IDirect3DVolume9* PDIRECT3DVOLUME9; alias IDirect3DVolumeTexture9* LPDIRECT3DVOLUMETEXTURE9; alias IDirect3DVolumeTexture9* PDIRECT3DVOLUMETEXTURE9; const int D3DADAPTER_DEFAULT = 0; const int D3DCAPS2_CANAUTOGENMIPMAP = 0x40000000; const int D3DCAPS2_CANCALIBRATEGAMMA = 0x00100000; const int D3DCAPS2_CANMANAGERESOURCE = 0x10000000; const int D3DCAPS2_DYNAMICTEXTURES = 0x20000000; const int D3DCAPS2_FULLSCREENGAMMA = 0x00020000; const int D3DCAPS2_RESERVED = 0x02000000; const int D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD = 0x00000020; const int D3DCAPS3_COPY_TO_VIDMEM = 0x00000100; const int D3DCAPS3_COPY_TO_SYSTEMMEM = 0x00000200; const int D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION = 0x00000080; const uint D3DCAPS3_RESERVED = 0x8000001f; const int D3DCLEAR_STENCIL = 0x00000004; const int D3DCLEAR_TARGET = 0x00000001; const int D3DCLEAR_ZBUFFER = 0x00000002; const int D3DCREATE_ADAPTERGROUP_DEVICE = 0x00000200; const int D3DCREATE_DISABLE_DRIVER_MANAGEMENT = 0x00000100; const int D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX = 0x00000400; const int D3DCREATE_FPU_PRESERVE = 0x00000002; const int D3DCREATE_HARDWARE_VERTEXPROCESSING = 0x00000040; const int D3DCREATE_MIXED_VERTEXPROCESSING = 0x00000080; const int D3DCREATE_MULTITHREADED = 0x00000004; const int D3DCREATE_NOWINDOWCHANGES = 0x00000800; const int D3DCREATE_PUREDEVICE = 0x00000010; const int D3DCREATE_SOFTWARE_VERTEXPROCESSING = 0x00000020; const int D3DCURSORCAPS_COLOR = 0x00000001; const int D3DCURSORCAPS_LOWRES = 0x00000002; const int D3DDEVCAPS2_ADAPTIVETESSRTPATCH = 0x00000004; const int D3DDEVCAPS2_ADAPTIVETESSNPATCH = 0x00000008; const int D3DDEVCAPS2_CAN_STRECTHRECT_FROM_TEXTURES = 0x00000010; const int D3DDEVCAPS2_DMAPNPATCH = 0x00000002; const int D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH = 0x00000020; const int D3DDEVCAPS2_STREAMOFFSET = 0x00000001; const int D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET = 0x00000040; const int D3DDTCAPS_UBYTE4 = 0x00000001; const int D3DDTCAPS_UBYTE4N = 0x00000002; const int D3DDTCAPS_SHORT2N = 0x00000004; const int D3DDTCAPS_SHORT4N = 0x00000008; const int D3DDTCAPS_USHORT2N = 0x00000010; const int D3DDTCAPS_USHORT4N = 0x00000020; const int D3DDTCAPS_UDEC3 = 0x00000040; const int D3DDTCAPS_DEC3N = 0x00000080; const int D3DDTCAPS_FLOAT16_2 = 0x00000100; const int D3DDTCAPS_FLOAT16_4 = 0x00000200; const int D3DENUM_WHQL_LEVEL = 0x00000002; const int D3DFVF_DIFFUSE = 0x040; const int D3DFVF_NORMAL = 0x010; const int D3DFVF_PSIZE = 0x020; const int D3DFVF_SPECULAR = 0x080; const int D3DFVF_XYZ = 0x002; const int D3DFVF_XYZRHW = 0x004; const int D3DFVF_XYZB1 = 0x006; const int D3DFVF_XYZB2 = 0x008; const int D3DFVF_XYZB3 = 0x00a; const int D3DFVF_XYZB4 = 0x00c; const int D3DFVF_XYZB5 = 0x00e; const int D3DFVF_XYZW = 0x4002; const int D3DFVF_TEX0 = 0x000; const int D3DFVF_TEX1 = 0x100; const int D3DFVF_TEX2 = 0x200; const int D3DFVF_TEX3 = 0x300; const int D3DFVF_TEX4 = 0x400; const int D3DFVF_TEX5 = 0x500; const int D3DFVF_TEX6 = 0x600; const int D3DFVF_TEX7 = 0x700; const int D3DFVF_TEX8 = 0x800; const int D3DFVF_POSITION_MASK = 0x400E; const int D3DFVF_RESERVED0 = 0x001; const int D3DFVF_RESERVED2 = 0x6000; const int D3DFVF_TEXCOUNT_MASK = 0xf00; const int D3DFVF_LASTBETA_D3DCOLOR = 0x8000; const int D3DFVF_LASTBETA_UBYTE4 = 0x1000; const int D3DFVF_TEXCOUNT_SHIFT = 8; const int D3DLOCK_DISCARD = 0x00002000; const int D3DLOCK_DONOTWAIT = 0x00004000; const int D3DLOCK_NO_DIRTY_UPDATE = 0x00008000; const int D3DLOCK_NOOVERWRITE = 0x00001000; const int D3DLOCK_NOSYSLOCK = 0x00000800; const int D3DLOCK_READONLY = 0x00000010; const int D3DPMISCCAPS_MASKZ = 0x00000002; const int D3DPMISCCAPS_CULLNONE = 0x00000010; const int D3DPMISCCAPS_CULLCW = 0x00000020; const int D3DPMISCCAPS_CULLCCW = 0x00000040; const int D3DPMISCCAPS_COLORWRITEENABLE = 0x00000100; const int D3DPMISCCAPS_CLIPPLANESCALEDPOINTS = 0x00000200; const int D3DPMISCCAPS_CLIPTLVERTS = 0x00000200; const int D3DPMISCCAPS_TSSARGTEMP = 0x00000400; const int D3DPMISCCAPS_BLENDOP = 0x00000800; const int D3DPMISCCAPS_NULLREFERENCE = 0x00000100; const int D3DPMISCCAPS_INDEPENDANTWRITEMASKS = 0x00004000; const int D3DPMISCCAPS_PERSTAGECONSTANT = 0x00008000; const int D3DPMISCCAPS_FOGANDSPECULARALPHA = 0x00010000; const int D3DPMISCCAPS_SEPARATEALPHABLEND = 0x00020000; const int D3DPMISCCAPS_MRTINDEPENDANTBITDEPTHS = 0x00040000; const int D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING = 0x00080000; const int D3DPMISCCAPS_FOGVERTEXCLAMPED = 0x00100000; const int D3DPRESENT_DONOTWAIT = 0x00000001; const int D3DPRESENT_INTERVAL_DEFAULT = 0x00000000; const int D3DPRESENT_INTERVAL_ONE = 0x00000001; const int D3DPRESENT_INTERVAL_TWO = 0x00000002; const int D3DPRESENT_INTERVAL_THREE = 0x00000004; const int D3DPRESENT_INTERVAL_FOUR = 0x00000008; const int D3DPRESENT_INTERVAL_IMMEDIATE = 0x00000000; const int D3DPRESENT_LINEAR_CONTENT = 0x00000002; const int D3DPRESENTFLAG_LOCKABLE_BACKBUFFER = 0x00000001; const int D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL = 0x00000002; const int D3DPRESENTFLAG_DEVICECLIP = 0x00000004; const int D3DPRESENTFLAG_VIDEO = 0x00000010; const int D3DPS20CAPS_ARBITRARYSWIZZLE = (1 << 0); const int D3DPS20CAPS_GRADIENTINSTRUCTIONS = (1 << 1); const int D3DPS20CAPS_PREDICATION = (1 << 2); const int D3DPS20CAPS_NODEPENDENTREADLIMIT = (1 << 3); const int D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT = (1 << 4); const int D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH = 24; const int D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0; const int D3DPS20_MAX_NUMTEMPS = 32; const int D3DPS20_MIN_NUMTEMPS = 12; const int D3DPS20_MAX_STATICFLOWCONTROLDEPTH = 4; const int D3DPS20_MIN_STATICFLOWCONTROLDEPTH = 0; const int D3DPS20_MAX_NUMINSTRUCTIONSLOTS = 512; const int D3DPS20_MIN_NUMINSTRUCTIONSLOTS = 96; const int D3DPTFILTERCAPS_MAGFPOINT = 0x01000000; const int D3DPTFILTERCAPS_MAGFLINEAR = 0x00020000; const int D3DPTFILTERCAPS_MAGFANISOTROPIC = 0x04000000; const int D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD = 0x08000000; const int D3DPTFILTERCAPS_MAGFGAUSSIANQUAD = 0x10000000; const int D3DPTFILTERCAPS_MINFPOINT = 0x00000100; const int D3DPTFILTERCAPS_MINFLINEAR = 0x00000200; const int D3DPTFILTERCAPS_MINFANISOTROPIC = 0x00000400; const int D3DPTFILTERCAPS_MINFPYRAMIDALQUAD = 0x00000800; const int D3DPTFILTERCAPS_MINFGAUSSIANQUAD = 0x00001000; const int D3DPTFILTERCAPS_MIPFPOINT = 0x00010000; const int D3DPTFILTERCAPS_MIPFLINEAR = 0x00020000; const int D3DSTENCILCAPS_KEEP = 0x00000001; const int D3DSTENCILCAPS_ZERO = 0x00000002; const int D3DSTENCILCAPS_REPLACE = 0x00000004; const int D3DSTENCILCAPS_INCRSAT = 0x00000008; const int D3DSTENCILCAPS_DECRSAT = 0x00000010; const int D3DSTENCILCAPS_INVERT = 0x00000020; const int D3DSTENCILCAPS_INCR = 0x00000040; const int D3DSTENCILCAPS_DECR = 0x00000080; const int D3DSTENCILCAPS_TWOSIDED = 0x00000100; const int D3DTA_CONSTANT = 0x00000006; const int D3DTA_CURRENT = 0x00000001; const int D3DTA_DIFFUSE = 0x00000000; const int D3DTA_SELECTMASK = 0x0000000f; const int D3DTA_SPECULAR = 0x00000004; const int D3DTA_TEMP = 0x00000005; const int D3DTA_TEXTURE = 0x00000002; const int D3DTA_TFACTOR = 0x00000003; const int D3DTTS_TCI_PASSTHRU = 0x00000000; const int D3DTTS_TCI_CAMERASPACENORMAL = 0x00010000; const int D3DTTS_TCI_CAMERASPACEPOSITION = 0x00020000; const int D3DTTS_TCI_CAMERASPACEREFLECTIONVECTOR = 0x00030000; const int D3DTTS_TCI_SPHEREMAP = 0x00040000; const int D3DUSAGE_AUTOGENMIPMAP = 0x00000400; const int D3DUSAGE_DEPTHSTENCIL = 0x00000002; const int D3DUSAGE_DMAP = 0x00004000; const int D3DUSAGE_DONOTCLIP = 0x00000020; const int D3DUSAGE_DYNAMIC = 0x00000200; const int D3DUSAGE_NPATCHES = 0x00000100; const int D3DUSAGE_POINTS = 0x00000040; const int D3DUSAGE_RENDERTARGET = 0x00000001; const int D3DUSAGE_RTPATCHES = 0x0000080; const int D3DUSAGE_SOFTWAREPROCESSING = 0x00000010; const int D3DUSAGE_WRITEONLY = 0x00000008; const int D3DUSAGE_QUERY_FILTER = 0x00020000; const int D3DUSAGE_QUERY_LEGACYBUMPMAP = 0x00008000; const int D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING = 0x00080000; const int D3DUSAGE_QUERY_SRGBREAD = 0x00010000; const int D3DUSAGE_QUERY_SRGBWRITE = 0x00040000; const int D3DUSAGE_QUERY_VERTEXTEXTURE = 0x00100000; const int D3DUSAGE_QUERY_WRAPANDMIP = 0x00200000; const int D3DVS20CAPS_PREDICATION = (1 << 0); const int D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH = 24; const int D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0; const int D3DVS20_MAX_NUMTEMPS = 32; const int D3DVS20_MIN_NUMTEMPS = 12; const int D3DVS20_MAX_STATICFLOWCONTROLDEPTH = 4; const int D3DVS20_MIN_STATICFLOWCONTROLDEPTH = 1; const int D3DDMAPSAMPLER = 256; const int D3DVERTEXTEXTURESAMPLER0 = D3DDMAPSAMPLER + 1; const int D3DVERTEXTEXTURESAMPLER1 = D3DDMAPSAMPLER + 2; const int D3DVERTEXTEXTURESAMPLER2 = D3DDMAPSAMPLER + 3; const int D3DVERTEXTEXTURESAMPLER3 = D3DDMAPSAMPLER + 4; const int D3DVTXPCAPS_DIRECTIONALLIGHTS = 0x0000008; const int D3DVTXPCAPS_LOCALVIEWER = 0x00000020; const int D3DVTXPCAPS_MATERIALSOURCE7 = 0x00000002; const int D3DVTXPCAPS_NO_TEXGEN_LOCALVIEWER = 0x00000200; const int D3DVTXPCAPS_POSITIONALLIGHTS = 0x00000010; const int D3DVTXPCAPS_TEXGEN = 0x00000001; const int D3DVTXPCAPS_TEXGEN_SPHEREMAP = 0x00000100; const int D3DVTXPCAPS_TWEENING = 0x00000040; const int D3DPV_DONOTCOPYDATA = (1 << 0); const int D3DSTREAMSOURCE_INDEXEDDATA = (1 << 30); const int D3DSTREAMSOURCE_INSTANCEDATA = (2 << 30); const int D3D_MAX_SIMULTANEOUS_RENDERTARGETS = 4; const int D3DDP_MAXTEXCOORD = 8; const int D3DPRESENT_BACK_BUFFERS_MAX = 3; const int D3DPRESENT_RATE_DEFAULT = 0x00000000; const int D3DRTYPECOUNT = D3DRESOURCETYPE.D3DRTYPE_INDEXBUFFER + 1; const int MAXD3DDECLLENGTH = 64; const int MAXD3DDECLMETHOD = D3DDECLMETHOD.D3DDECLMETHOD_LOOKUPPRESAMPLED; const int MAXD3DDECLTYPE = D3DDECLTYPE.D3DDECLTYPE_UNUSED; const int MAXD3DDECLUSAGE = D3DDECLUSAGE.D3DDECLUSAGE_SAMPLE; const int MAXD3DDECLUSAGEINDEX = 15; const int D3D_SDK_VERSION = (32 | 0x80000000); const int D3D9b_SDK_VERSION = (31 |0x80000000); const int MAX_DEVICE_IDENTIFIER_STRING = 512; const byte D3DCLIPPLANE0 = 1 << 0; const byte D3DCLIPPLANE1 = 1 << 1; const byte D3DCLIPPLANE2 = 1 << 2; const byte D3DCLIPPLANE3 = 1 << 3; const byte D3DCLIPPLANE4 = 1 << 4; const byte D3DCLIPPLANE5 = 1 << 5; const int D3DFVF_TEXTUREFORMAT1 = 3; const int D3DFVF_TEXTUREFORMAT2 = 0; const int D3DFVF_TEXTUREFORMAT3 = 1; const int D3DFVF_TEXTUREFORMAT4 = 2; const int D3DSP_TEXTURETYPE_SHIFT = 27; const int _FACD3D = 0x876; enum D3DBACKBUFFER_TYPE { D3DBACKBUFFER_TYPE_MONO = 0, D3DBACKBUFFER_TYPE_LEFT = 1, D3DBACKBUFFER_TYPE_RIGHT = 2, D3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff } enum D3DBASISTYPE { D3DBASIS_BEZIER = 0, D3DBASIS_BSPLINE = 1, D3DBASIS_CATMULL_ROM = 2, D3DBASIS_FORCE_DWORD = 0x7fffffff } enum D3DBLEND { D3DBLEND_ZERO = 1, D3DBLEND_ONE = 2, D3DBLEND_SRCCOLOR = 3, D3DBLEND_INVSRCCOLOR = 4, D3DBLEND_SRCALPHA = 5, D3DBLEND_INVSRCALPHA = 6, D3DBLEND_DESTALPHA = 7, D3DBLEND_INVDESTALPHA = 8, D3DBLEND_DESTCOLOR = 9, D3DBLEND_INVDESTCOLOR = 10, D3DBLEND_SRCALPHASAT = 11, D3DBLEND_BOTHSRCALPHA = 12, D3DBLEND_BOTHINVSRCALPHA = 13, D3DBLEND_BLENDFACTOR = 14, D3DBLEND_INVBLENDFACTOR = 15, D3DBLEND_FORCE_DWORD = 0x7fffffff } enum D3DBLENDOP { D3DBLENDOP_ADD = 1, D3DBLENDOP_SUBTRACT = 2, D3DBLENDOP_REVSUBTRACT = 3, D3DBLENDOP_MIN = 4, D3DBLENDOP_MAX = 5, D3DBLENDOP_FORCE_DWORD = 0x7fffffff } enum D3DCMPFUNC { D3DCMP_NEVER = 1, D3DCMP_LESS = 2, D3DCMP_EQUAL = 3, D3DCMP_LESSEQUAL = 4, D3DCMP_GREATER = 5, D3DCMP_NOTEQUAL = 6, D3DCMP_GREATEREQUAL = 7, D3DCMP_ALWAYS = 8, D3DCMP_FORCE_DWORD = 0x7fffffff } enum D3DCUBEMAP_FACES { D3DCUBEMAP_FACE_POSITIVE_X = 0, D3DCUBEMAP_FACE_NEGATIVE_X = 1, D3DCUBEMAP_FACE_POSITIVE_Y = 2, D3DCUBEMAP_FACE_NEGATIVE_Y = 3, D3DCUBEMAP_FACE_POSITIVE_Z = 4, D3DCUBEMAP_FACE_NEGATIVE_Z = 5, D3DCUBEMAP_FACE_FORCE_DWORD = 0x7fffffff } enum D3DCULL { D3DCULL_NONE = 1, D3DCULL_CW = 2, D3DCULL_CCW = 3, D3DCULL_FORCE_DWORD = 0x7fffffff } enum D3DDEBUGMONITORTOKENS { D3DDMT_ENABLE = 0, D3DDMT_DISABLE = 1, D3DDMT_FORCE_DWORD = 0x7fffffff } enum D3DDECLMETHOD { D3DDECLMETHOD_DEFAULT = 0, D3DDECLMETHOD_PARTIALU = 1, D3DDECLMETHOD_PARTIALV = 2, D3DDECLMETHOD_CROSSUV = 3, D3DDECLMETHOD_UV = 4, D3DDECLMETHOD_LOOKUP = 5, D3DDECLMETHOD_LOOKUPPRESAMPLED = 6 } enum D3DDECLTYPE { D3DDECLTYPE_FLOAT1 = 0, D3DDECLTYPE_FLOAT2 = 1, D3DDECLTYPE_FLOAT3 = 2, D3DDECLTYPE_FLOAT4 = 3, D3DDECLTYPE_D3DCOLOR = 4, D3DDECLTYPE_UBYTE4 = 5, D3DDECLTYPE_SHORT2 = 6, D3DDECLTYPE_SHORT4 = 7, D3DDECLTYPE_UBYTE4N = 8, D3DDECLTYPE_SHORT2N = 9, D3DDECLTYPE_SHORT4N = 10, D3DDECLTYPE_USHORT2N = 11, D3DDECLTYPE_USHORT4N = 12, D3DDECLTYPE_UDEC3 = 13, D3DDECLTYPE_DEC3N = 14, D3DDECLTYPE_FLOAT16_2 = 15, D3DDECLTYPE_FLOAT16_4 = 16, D3DDECLTYPE_UNUSED = 17 } enum D3DDECLUSAGE { D3DDECLUSAGE_POSITION = 0, D3DDECLUSAGE_BLENDWEIGHT = 1, D3DDECLUSAGE_BLENDINDICES = 2, D3DDECLUSAGE_NORMAL = 3, D3DDECLUSAGE_PSIZE = 4, D3DDECLUSAGE_TEXCOORD = 5, D3DDECLUSAGE_TANGENT = 6, D3DDECLUSAGE_BINORMAL = 7, D3DDECLUSAGE_TESSFACTOR = 8, D3DDECLUSAGE_POSITIONT = 9, D3DDECLUSAGE_COLOR = 10, D3DDECLUSAGE_FOG = 11, D3DDECLUSAGE_DEPTH = 12, D3DDECLUSAGE_SAMPLE = 13 } enum D3DDEGREETYPE { D3DDEGREE_LINEAR = 1, D3DDEGREE_QUADRATIC = 2, D3DDEGREE_CUBIC = 3, D3DDEGREE_QUINTIC = 5, D3DCULL_FORCE_DWORD = 0x7fffffff } enum D3DDEVTYPE { D3DDEVTYPE_HAL = 1, D3DDEVTYPE_NULLREF = 4, D3DDEVTYPE_REF = 2, D3DDEVTYPE_SW = 3, D3DDEVTYPE_FORCE_DWORD = 0x7fffffff } enum D3DFILLMODE { D3DFILL_POINT = 1, D3DFILL_WIREFRAME = 2, D3DFILL_SOLID = 3, D3DFILL_FORCE_DWORD = 0x7fffffff } enum D3DFOGMODE { D3DFOG_NONE = 0, D3DFOG_EXP = 1, D3DFOG_EXP2 = 2, D3DFOG_LINEAR = 3, D3DFOG_FORCE_DWORD = 0x7fffffff } enum D3DFORMAT { D3DFMT_R8G8B8 = 20, D3DFMT_A8R8G8B8 = 21, D3DFMT_X8R8G8B8 = 22, D3DFMT_R5G6B5 = 23, D3DFMT_X1R5G5B5 = 24, D3DFMT_A1R5G5B5 = 25, D3DFMT_A4R4G4B4 = 26, D3DFMT_R3G3B2 = 27, D3DFMT_A8 = 28, D3DFMT_A8R3G3B2 = 29, D3DFMT_X4R4G4B4 = 30, D3DFMT_A2B10G10R10 = 31, D3DFMT_A8B8G8R8 = 32, D3DFMT_X8B8G8R8 = 33, D3DFMT_G16R16 = 34, D3DFMT_A2R10G10B10 = 35, D3DFMT_A16B16G16R16 = 36, D3DFMT_A8P8 = 40, D3DFMT_P8 = 41, D3DFMT_L8 = 50, D3DFMT_L16 = 81, D3DFMT_A8L8 = 51, D3DFMT_A4L4 = 52, D3DFMT_V8U8 = 60, D3DFMT_Q8W8V8U8 = 63, D3DFMT_V16U16 = 64, D3DFMT_Q16W16V16U16 = 110, D3DFMT_CxV8U8 = 117, D3DFMT_L6V5U5 = 61, D3DFMT_X8L8V8U8 = 62, D3DFMT_A2W10V10U10 = 67, D3DFMT_MULTI2_ARGB8 = 827606349, D3DFMT_G8R8_G8B8 = 1111970375, D3DFMT_R8G8_B8G8 = 1195525970, D3DFMT_DXT1 = 827611204, D3DFMT_DXT2 = 844388420, D3DFMT_DXT3 = 861165636, D3DFMT_DXT4 = 877942852, D3DFMT_DXT5 = 894720068, D3DFMT_UYVY = 1498831189, D3DFMT_UYU2 = 844454229, D3DFMT_D16_LOCKABLE = 70, D3DFMT_D32 = 71, D3DFMT_D15S1 = 73, D3DFMT_D24S8 = 75, D3DFMT_D24X8 = 77, D3DFMT_D24X4S4 = 79, D3DFMT_D32_LOCKABLE = 82, D3DFMT_D24FS8 = 83, D3DFMT_D16 = 80, D3DFMT_VERTEXDATA = 100, D3DFMT_INDEX16 = 101, D3DFMT_INDEX32 = 102, D3DFMT_R16F = 111, D3DFMT_G16R16F = 112, D3DFMT_A16B16G16R16F = 113, D3DFMT_R32F = 114, D3DFMT_G32R32F = 115, D3DFMT_A32B32G32R32F = 116, D3DFMT_UNKNOWN = 0 } enum D3DLIGHTTYPE { D3DLIGHT_POINT = 1, D3DLIGHT_SPOT = 2, D3DLIGHT_DIRECTIONAL = 3, D3DLIGHT_FORCE_DWORD = 0x7fffffff } enum D3DMATERIALCOLORSOURCE { D3DMCS_MATERIAL = 0, D3DMCS_COLOR1 = 1, D3DMCS_COLOR2 = 2, D3DMCS_FORCE_DWORD = 0x7fffffff } enum D3DMULTISAMPLE_TYPE { D3DMULTISAMPLE_NONE = 0, D3DMULTISAMPLE_NONMASKABLE = 1, D3DMULTISAMPLE_2_SAMPLES = 2, D3DMULTISAMPLE_3_SAMPLES = 3, D3DMULTISAMPLE_4_SAMPLES = 4, D3DMULTISAMPLE_5_SAMPLES = 5, D3DMULTISAMPLE_6_SAMPLES = 6, D3DMULTISAMPLE_7_SAMPLES = 7, D3DMULTISAMPLE_8_SAMPLES = 8, D3DMULTISAMPLE_9_SAMPLES = 9, D3DMULTISAMPLE_10_SAMPLES = 10, D3DMULTISAMPLE_11_SAMPLES = 11, D3DMULTISAMPLE_12_SAMPLES = 12, D3DMULTISAMPLE_13_SAMPLES = 13, D3DMULTISAMPLE_14_SAMPLES = 14, D3DMULTISAMPLE_15_SAMPLES = 15, D3DMULTISAMPLE_16_SAMPLES = 16, D3DMULTISAMPLE_FORCE_DWORD = 0x7fffffff } enum D3DPATCHEDGESTYLE { D3DPATCHEDGE_DISCRETE = 0, D3DPATCHEDGE_CONTINUOUS = 1, D3DPATCHEDGE_FORCE_DWORD = 0x7fffffff } enum D3DPOOL { D3DPOOL_DEFAULT = 0, D3DPOOL_MANAGED = 1, D3DPOOL_SYSTEMMEM = 2, D3DPOOL_SCRATCH = 3, D3DPOOL_FORCE_DWORD = 0x7fffffff } enum D3DPRIMITIVETYPE { D3DPT_POINTLIST = 1, D3DPT_LINELIST = 2, D3DPT_LINESTRIP = 3, D3DPT_TRIANGLELIST = 4, D3DPT_TRIANGLESTRIP = 5, D3DPT_TRIANGLEFAN = 6, D3DPT_FORCE_DWORD = 0x7fffffff } enum D3DQUERYTYPE { D3DQUERYTYPE_VCACHE = 4, D3DQUERYTYPE_RESOURCEMANAGER = 5, D3DQUERYTYPE_VERTEXSTATS = 6, D3DQUERYTYPE_EVENT = 8, D3DQUERYTYPE_OCCLUSION = 9, D3DQUERYTYPE_TIMESTAMP = 10, D3DQUERYTYPE_TIMESTAMPDISJOINT = 11, D3DQUERYTYPE_TIMESTAMPFREQ = 12, D3DQUERYTYPE_PIPELINETIMINGS = 13, D3DQUERYTYPE_INTERFACETIMINGS = 14, D3DQUERYTYPE_VERTEXTIMINGS = 15, D3DQUERYTYPE_PIXELTIMINGS = 16, D3DQUERYTYPE_BANDWIDTHTIMINGS = 17, D3DQUERYTYPE_CACHEUTILIZATION = 18 } enum D3DRENDERSTATETYPE { D3DRS_ZENABLE = 7, D3DRS_FILLMODE = 8, D3DRS_SHADEMODE = 9, D3DRS_ZWRITEENABLE = 14, D3DRS_ALPHASTATEENABLE = 15, D3DRS_LASTPIXEL = 16, D3DRS_SRCBLEND = 19, D3DRS_DESTBLEND = 20, D3DRS_CULLMODE = 22, D3DRS_ZFUNC = 23, D3DRS_ALPHAREF = 24, D3DRS_ALPHAFUNC = 25, D3DRS_DITHERENABLE = 26, D3DRS_ALPHABLENDENABLE = 27, D3DRS_FOGENABLE = 28, D3DRS_SPECULARENABLE = 29, D3DRS_FOGCOLOR = 34, D3DRS_FOGTABLEMODE = 35, D3DRS_FOGSTART = 36, D3DRS_FOGEND = 37, D3DRS_FOGDENSITY = 38, D3DRS_RANGEFOGENABLE = 48, D3DRS_STENCILENABLE = 52, D3DRS_STENCILFAIL = 53, D3DRS_STENCILZFAIL = 54, D3DRS_STENCILPASS = 55, D3DRS_STENCILFUNC = 56, D3DRS_STENCILREF = 57, D3DRS_STENCILMASK = 58, D3DRS_STENCILWRITEMASK = 59, D3DRS_TEXTUREFACTOR = 60, D3DRS_WRAP0 = 128, D3DRS_WRAP1 = 129, D3DRS_WRAP2 = 130, D3DRS_WRAP3 = 131, D3DRS_WRAP4 = 132, D3DRS_WRAP5 = 133, D3DRS_WRAP6 = 134, D3DRS_WRAP7 = 135, D3DRS_CLIPPING = 136, D3DRS_LIGHTING = 137, D3DRS_AMBIENT = 139, D3DRS_FOGVERTEXMODE = 140, D3DRS_COLORVERTEX = 141, D3DRS_LOCALVIEWER = 142, D3DRS_NORMALIZENORMALS = 143, D3DRS_DIFFUSEMATERIALSOURCE = 145, D3DRS_SPECULARMATERIALSOURCE = 146, D3DRS_AMBIENTMATERIALSOURCE = 147, D3DRS_EMISSIVEMATERIALSOURCE = 148, D3DRS_VERTEXBLEND = 151, D3DRS_CLIPPLANEENABLE = 152, D3DRS_POINTSIZE = 154, D3DRS_POINTSIZE_MIN = 155, D3DRS_POINTSPRITEENABLE = 156, D3DRS_POINTSCALEENABLE = 157, D3DRS_POINTSCALE_A = 158, D3DRS_POINTSCALE_B = 159, D3DRS_POINTSCALE_C = 160, D3DRS_MULTISAMPLEANTIALIAS = 161, D3DRS_MULTISAMPLEMASK = 162, D3DRS_PATCHEDGESTYLE = 163, D3DRS_DEBUGMONITORTOKEN = 165, D3DRS_POINTSIZE_MAX = 166, D3DRS_INDEXEDVERTEXBLENDENABLE = 167, D3DRS_COLORWRITEENABLE = 168, D3DRS_TWEENFACTOR = 170, D3DRS_BLENDOP = 171, D3DRS_POSITIONDEGREE = 172, D3DRS_NORMALDEGREE = 173, D3DRS_SCISSORTESTENABLE = 174, D3DRS_SLOPESCALEDEPTHBIAS = 175, D3DRS_ANTIALIASEDLINEENABLE = 176, D3DRS_MINTESSELATIONLEVEL = 178, D3DRS_MAXTESSELATIONLEVEL = 179, D3DRS_ADAPTIVENESS_X = 180, D3DRS_ADAPTIVENESS_Y = 181, D3DRS_ADAPTIVENESS_Z = 182, D3DRS_ADAPTIVENESS_W = 183, D3DRS_ENABLEADAPTIVETESSELATION = 184, D3DRS_TWOSIDEDSTENCILMODE = 185, D3DRS_CCW_STENCILFAIL = 186, D3DRS_CCW_STENCILZFAIL = 187, D3DRS_CCW_STENCILPASS = 188, D3DRS_CCW_STENCILFUNC = 189, D3DRS_COLORWRITEENABLE1 = 190, D3DRS_COLORWRITEENABLE2 = 191, D3DRS_COLORWRITEENABLE3 = 192, D3DRS_BLENDFACTOR = 193, D3DRS_SRGBWRITEENABLE = 194, D3DRS_DEPTHBIAS = 195, D3DRS_WRAP8 = 198, D3DRS_WRAP9 = 199, D3DRS_WRAP10 = 200, D3DRS_WRAP11 = 201, D3DRS_WRAP12 = 202, D3DRS_WRAP13 = 203, D3DRS_WRAP14 = 204, D3DRS_WRAP15 = 205, D3DRS_SEPARATEALPHABLENDENABLE = 206, D3DRS_SRCBLENDALPHA = 207, D3DRS_DESTBLENDALPHA = 208, D3DRS_BLENDOPALPHA = 209, D3DRS_FORCE_DWORD = 0x7fffffff } enum D3DRESOURCETYPE { D3DRTYPE_SURFACE = 1, D3DRTYPE_VOLUME = 2, D3DRTYPE_TEXTURE = 3, D3DRTYPE_VOLUMETEXTURE = 4, D3DRTYPE_CUBETEXTURE = 5, D3DRTYPE_VERTEXBUFFER = 6, D3DRTYPE_INDEXBUFFER = 7, D3DRTYPE_FORCE_DWORD = 0x7fffffff } enum D3DSAMPLER_TEXTURE_TYPE { D3DSTT_UNKNOWN = 0 << D3DSP_TEXTURETYPE_SHIFT, D3DSTT_1D = 1 << D3DSP_TEXTURETYPE_SHIFT, D3DSTT_2D = 2 << D3DSP_TEXTURETYPE_SHIFT, D3DSTT_CUBE = 3 << D3DSP_TEXTURETYPE_SHIFT, D3DSTT_VOLUME = 4 << D3DSP_TEXTURETYPE_SHIFT, D3DSTT_FORCE_DWORD = 0x7fffffff } enum D3DSAMPLERSTATETYPE { D3DSAMP_ADDRESSU = 1, D3DSAMP_ADDRESSV = 2, D3DSAMP_ADDRESSW = 3, D3DSAMP_BORDERCOLOR = 4, D3DSAMP_MAGFILTER = 5, D3DSAMP_MINFILTER = 6, D3DSAMP_MAXFILTER = 7, D3DSAMP_MIPMAPLODBIAS = 8, D3DSAMP_MAXMIPLEVEL = 9, D3DSAMP_MAXANISOTROPY = 10, D3DSAMP_SRGBTEXTURE = 11, D3DSAMP_ELEMENTINDEX = 12, D3DSAMP_DMAPOFFSET = 13, D3DSAMP_FORCE_DWORD = 0x7fffffff } enum D3DSHADEMODE { D3DSHADE_FLAT = 1, D3DSHADE_GOURAUD = 2, D3DSHADE_PHONG = 3, D3DSHADE_FORCE_DWORD = 0x7fffffff } enum D3DSTATEBLOCKTYPE { D3DSBT_ALL = 1, D3DSBT_PIXELSTATE = 2, D3DSBT_VERTEXSTATE = 3, D3DSBT_FORCE_DWORD = 0x7fffffff } enum D3DSTENCILOP { D3DSTENCILOP_KEEP = 1, D3DSTENCILOP_ZERO = 2, D3DSTENCILOP_REPLACE = 3, D3DSTENCILOP_INCRSAT = 4, D3DSTENCILOP_DECRSAT = 5, D3DSTENCILOP_INVERT = 6, D3DSTENCILOP_INCR = 7, D3DSTENCILOP_DECR = 8, D3DSTENCILOP_FORCE_DWORD = 0x7fffffff } enum D3DSWAPEFFECT { D3DSWAPEFFECT_DISCARD = 1, D3DSWAPEFFECT_FLIP = 2, D3DSWAPEFFECT_COPY = 3, D3DSWAPEFFECT_FORCE_DWORD = 0x7fffffff } enum D3DTEXTUREADDRESS { D3DTADDRESS_WRAP = 1, D3DTADDRESS_MIRROR = 2, D3DTADDRESS_CLAMP = 3, D3DTADDRESS_BORDER = 4, D3DTADDRESS_MIRRORONCE = 5, D3DTADDRESS_FORCE_DWORD = 0x7fffffff } enum D3DTEXTUREFILTERTYPE { D3DTEXF_NONE = 0, D3DTEXF_POINT = 1, D3DTEXF_LINEAR = 2, D3DTEXF_ANISOTROPIC = 3, D3DTEXF_PYRAMIDALQUAD = 6, D3DTEXF_GAUSSIANQUAD = 7, D3DTEXF_FORCE_DWORD = 0x7fffffff } enum D3DTEXTUREOP { D3DTOP_DISABLE = 1, D3DTOP_SELECTARG1 = 2, D3DTOP_SELECTARG2 = 3, D3DTOP_MODULATE = 4, D3DTOP_MODULATE2X = 5, D3DTOP_MODULATE4X = 6, D3DTOP_ADD = 7, D3DTOP_ADDSIGNED = 8, D3DTOP_ADDSIGNED2X = 9, D3DTOP_SUBTRACT = 10, D3DTOP_ADDSMOOTH = 11, D3DTOP_BLENDDIFFUSEALPHA = 12, D3DTOP_BLENDTEXTUREALPHA = 13, D3DTOP_BLENDFACTORALPHA = 14, D3DTOP_BLENDTEXTUREALPHAPM = 15, D3DTOP_BLENDCURRENTALPHA = 16, D3DTOP_PREMODULATE = 17, D3DTOP_MODULATEALPHA_ADDCOLOR = 18, D3DTOP_MODULATECOLOR_ADDALPHA = 19, D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, D3DTOP_BUMPENVMAP = 22, D3DTOP_BUMPENVMAPLUMINANCE = 23, D3DTOP_DOTPRODUCT3 = 24, D3DTOP_MULTIPLYADD = 25, D3DTOP_LERP = 26, D3DTOP_FORCE_DWORD = 0x7fffffff } enum D3DTEXTURESTAGESTATETYPE { D3DTSS_COLOROP = 1, D3DTSS_COLORARG1 = 2, D3DTSS_COLORARG2 = 3, D3DTSS_ALPHAOP = 4, D3DTSS_ALPHAARG1 = 5, D3DTSS_ALPHAARG2 = 6, D3DTSS_BUMPENVMAT00 = 7, D3DTSS_BUMPENVMAT01 = 8, D3DTSS_BUMPENVMAT10 = 9, D3DTSS_BUMPENVMAT11 = 10, D3DTSS_TEXCOORDINDEX = 11, D3DTSS_BUMPENVLSCALE = 22, D3DTSS_BUMPENVLOFFSET = 23, D3DTSS_TEXTURETRANSFORMFLAGS = 24, D3DTSS_COLORARG0 = 26, D3DTSS_ALPHAARG0 = 27, D3DTSS_RESULTARG = 28, D3DTSS_CONSTANT = 32, D3DTSS_FORCE_DWORD = 0x7fffffff } enum D3DTEXTURETRANSFORMFLAGS { D3DTTFF_DISABLE = 0, D3DTTFF_COUNT1 = 1, D3DTTFF_COUNT2 = 2, D3DTTFF_COUNT3 = 3, D3DTTFF_COUNT4 = 4, D3DTTFF_PROJECTED = 256, D3DTTFF_FORCE_DWORD = 0x7fffffff } enum D3DTRANSFORMSTATETYPE { D3DDTS_VIEW = 2, D3DDTS_PROJECTION = 3, D3DDTS_TEXTURE0 = 16, D3DDTS_TEXTURE1 = 17, D3DDTS_TEXTURE2 = 18, D3DDTS_TEXTURE3 = 19, D3DDTS_TEXTURE4 = 20, D3DDTS_TEXTURE5 = 21, D3DDTS_TEXTURE6 = 22, D3DDTS_TEXTURE7 = 23, D3DDTS_FORCE_DWORD = 0x7fffffff } enum D3DVERTEXBLENDFLAGS { D3DVBF_DISABLE = 0, D3DVBF_1WEIGHTS = 1, D3DVBF_2WEIGHTS = 2, D3DVBF_3WEIGHTS = 3, D3DVBF_TWEENING = 255, D3DVBF_0WEIGHTS = 256 } enum D3DZBUFFERTYPE { D3DZB_FALSE = 0, D3DZB_TRUE = 1, D3DZB_USEW = 2, D3DZB_FORCE_DWORD = 0x7fffffff } struct D3DADAPTER_IDENTIFIER9 { char Device[MAX_DEVICE_IDENTIFIER_STRING]; char Description[MAX_DEVICE_IDENTIFIER_STRING]; char DeviceName[32]; long DriverVersion; DWORD DriverVersionLowPart; DWORD DriverVersionHighPart; DWORD VendorId; DWORD DeviceId; DWORD SubSysId; DWORD Revision; GUID DeviceIdentifier; DWORD WQHLLevel; } struct D3DBOX { UINT Left; UINT Top; UINT Right; UINT Bottom; UINT Front; UINT Back; } struct D3DVSHADERCAPS2_0 { DWORD Caps; INT DynamicFlowControlDepth; INT NumTemps; INT StaticFlowControlDepth; } struct D3DPSHADERCAPS2_0 { DWORD Caps; INT DynamicFlowControlDepth; INT NumTemps; INT StaticFlowControlDepth; INT NumInstructionSlots; } struct D3DCAPS9 { D3DDEVTYPE DeviceType; UINT AdapterOrdinal; DWORD Caps; DWORD Caps2; DWORD Caps3; DWORD PresentationIntervals; DWORD CursorCaps; DWORD DevCaps; DWORD PrimitiveMiscCaps; DWORD RasterCaps; DWORD ZCmpCaps; DWORD SrcBlendCaps; DWORD DestBlendCaps; DWORD AlphaCmpCaps; DWORD ShadeCaps; DWORD TextureCaps; DWORD TextureFilterCaps; DWORD CubeTextureFilterCaps; DWORD VolumeTextureFilterCaps; DWORD LineCaps; DWORD MaxTextureWidth; DWORD MaxTextureHeight; DWORD MaxTextureExtent; DWORD MaxTextureRepeat; DWORD MaxTextureAspectRatio; DWORD MaxAnisotropy; float MaxVertexW; float GuardBandLeft; float GuardBandTop; float GuardBandRight; float GuardBandBottom; float ExtentsAdjust; DWORD StencilCaps; DWORD FVFCaps; DWORD TextureOpCaps; DWORD MaxTextureBlendStages; DWORD MaxSimultaneousTextures; DWORD VertexProcessingCaps; DWORD MaxActiveLights; DWORD MaxUserClipPlanes; DWORD MaxVertexBlendMatrices; DWORD MaxVertexBlendMatrixIndex; float MaxPointSize; DWORD MaxPrimitiveCount; DWORD MaxVertexIndex; DWORD MaxStreams; DWORD MaxStreamStride; DWORD VertexShaderVersion; DWORD MaxVertexShaderConst; DWORD PixelShaderVersion; float PixelShader1xMaxValue; DWORD DevCaps2; float MaxNpatchTessellationLevel; UINT MasterAdapterOrdinal; UINT AdapterOrdinalInGroup; UINT NumberOfAdaptersInGroup; DWORD DeclTypes; DWORD NumSimultaneousRTs; DWORD StretchRectFilterCaps; D3DVSHADERCAPS2_0 VS20Caps; D3DPSHADERCAPS2_0 PS20Caps; DWORD VertexTextureFilterCaps; DWORD MaxVShaderInstructionsExecuted; DWORD MaxPShaderInstructionsExecuted; DWORD MaxVertexShader30InstructionSlots; DWORD MaxPixelShader30InstructionSlots; DWORD Reserved2; DWORD Reserved3; } struct D3DCLIPSTATUS9 { DWORD ClipUnion; DWORD ClipIntersection; } struct D3DCOLORVALUE { float r; float g; float b; float a; } struct D3DDEVICE_CREATION_PARAMETERS { UINT AdapterOrdinal; D3DDEVTYPE DeviceType; HWND hFocusWindow; DWORD BehaviorFlags; } struct D3DDEVINFO_D3D9BANDWIDTHTIMINGS { FLOAT MaxBandwithUtilized; FLOAT FloatEndUploadMemoryUtilizedPercent; FLOAT VertexRateUtilizedPercent; FLOAT TriangleSetupRateUtilizedPercent; FLOAT FillRateUtilizedPercent; } struct D3DDEVINFO_D3D9CACHEUTILIZATION { FLOAT TextureCacheHitRate; FLOAT PostTransformVertexCacheHitRate; } struct D3DEVINFO_D3D9INTERFACETIMINGS { FLOAT WaitingForGPUToUseApplicationResourceTimePercent; FLOAT WaitingForGPUToAcceptMoreCommandsTimePercent; FLOAT WaitingForGPUToStayWithinLatencyTimePercent; FLOAT WaitingForGPUExclusiveResourceTimePercent; FLOAT WaitingForGPUOtherTimePercent; } struct D3DDEVINFO_D3D9PIPELINETIMINGS { FLOAT VertexProcessingTimePercent; FLOAT PixelProcessingTimePercent; FLOAT OtherGPUProcessingTimePercent; FLOAT GPUIdleTimePercent; } struct D3DDEVINFO_D3D9STAGETIMINGS { FLOAT MemoryProcessingPercent; FLOAT ComputationProcessingPercent; } struct D3DDEVINFO_D3D9VERTEXSTATS { DWORD NumRenderedTriangles; DWORD NumExtraClippingTriangles; } struct D3DRESOURCESTATS { BOOL bThrashing; DWORD ApproxBytesDownloaded; DWORD NumEvicts; DWORD NumVidCreates; DWORD LastPri; DWORD NumUsed; DWORD NumUsedInVidMem; DWORD WorkingSet; DWORD WorkingSetBytes; DWORD TotalManaged; DWORD TotalBytes; } struct D3DDEVINFO_RESOURCEMANAGER { D3DRESOURCESTATS stats[D3DRTYPECOUNT]; } struct D3DDEVINFO_VCACHE { DWORD Pattern; DWORD OptMethod; DWORD CacheSize; DWORD MagicNumber; } struct D3DDISPLAYMODE { UINT Width; UINT Height; UINT RefreshRate; D3DFORMAT Format; } struct D3DGAMMARAMP { WORD red[256]; WORD green[256]; WORD blue[256]; } struct D3DINDEXBUFFER_DESC { D3DFORMAT Format; D3DRESOURCETYPE Type; DWORD Usage; D3DPOOL Pool; UINT Size; } struct D3DVECTOR { float x, y, z; } struct D3DLIGHT9 { D3DLIGHTTYPE Type; D3DCOLORVALUE Diffuse; D3DCOLORVALUE Specular; D3DCOLORVALUE Ambient; D3DVECTOR Position; D3DVECTOR Direction; float Range; float Falloff; float Attenuation0; float Attenuation1; float Attenuation2; float Theta; float Phi; } struct D3DLOCKED_BOX { int RowPitch; int SlicePitch; void *pBits; } struct D3DLOCKED_RECT { INT Pitch; void *pBits; } struct D3DMATERIAL9 { D3DCOLORVALUE Diffuse; D3DCOLORVALUE Ambient; D3DCOLORVALUE Specular; D3DCOLORVALUE Emissive; float Power; } struct D3DMATRIX { union { struct { float _11, _12, _13, _14; float _21, _22, _23, _24; float _31, _32, _33, _34; float _41, _42, _43, _44; } float m[4][4]; } } struct D3DPRESENT_PARAMETERS { UINT BackBufferWidth, BackBufferHeight; D3DFORMAT BackBufferFormat; UINT BackBufferCount; D3DMULTISAMPLE_TYPE MultiSampleType; DWORD MultiSampleQuality; D3DSWAPEFFECT SwapEffect; HWND hDeviceWindow; BOOL Windowed; BOOL EnableAutoDepthStencil; D3DFORMAT AutoDepthStencilFormat; DWORD Flags; UINT FullScreen_RefreshRateInHz; UINT PresentationInterval; } struct D3DRANGE { UINT Offset; UINT Size; } struct D3DRASTER_STATUS { BOOL InVBlank; UINT ScanLine; } struct D3DRECT { LONG x1, y1; LONG x2, y2; } struct D3DRECTPATCH_INFO { UINT StartVertexOffsetWidth; UINT StartVertexOffsetHeight; UINT Width; UINT Height; UINT Stride; D3DBASISTYPE Basis; D3DDEGREETYPE Degree; } struct D3DSURFACE_DESC { D3DFORMAT Format; D3DRESOURCETYPE Type; DWORD Usage; D3DPOOL Pool; D3DMULTISAMPLE_TYPE MultiSampleType; DWORD MultiSampleQuality; UINT Width; UINT Height; } struct D3DTRIPATCH_INFO { UINT StartVertexOffset; UINT NumVertices; D3DBASISTYPE Basis; D3DDEGREETYPE Degree; } struct D3DVERTEXBUFFER_DESC { D3DFORMAT Format; D3DRESOURCETYPE Type; DWORD Usage; D3DPOOL Pool; UINT Size; DWORD FVF; } struct D3DVERTEXELEMENT9 { WORD Stream; WORD Offset; BYTE Type; BYTE Method; BYTE Usage; BYTE UsageIndex; } struct D3DVIEWPORT9 { DWORD X; DWORD Y; DWORD Width; DWORD Height; float MinZ; float MaxZ; } struct D3DVOLUME_DESC { D3DFORMAT Format; D3DRESOURCETYPE Type; DWORD Usage; D3DPOOL Pool; UINT Width; UINT Height; UINT Depth; } struct PALETTEENTRY { BYTE peRed; BYTE peGreen; BYTE peBlue; BYTE peFlags; } struct RGNDATAHEADER { DWORD dwSize; DWORD iType; DWORD nCount; DWORD nRgnSize; RECT rcBound; } struct RGNDATA { RGNDATAHEADER rdh; char Buffer[1]; } D3DCOLOR D3DCOLOR_ARGB(ubyte a, ubyte r, ubyte g, ubyte b) { return (D3DCOLOR)(((a & 0xff) << 24) | (( r & 0xff) << 16) | (( g & 0xff) << 8) | (b & 0xff)); } D3DCOLOR D3DCOLOR_AYUV(ubyte a, ubyte y, ubyte u, ubyte v) { return D3DCOLOR_ARGB(a, y, u , v); } D3DCOLOR D3DCOLOR_COLORVALUE(float r, float g, float b, float a) { return D3DCOLOR_RGBA((DWORD)(r * 255.f), (DWORD)(g * 255.f), (DWORD)(b * 255.f), (DWORD)(a * 255.f)); } D3DCOLOR D3DCOLOR_RGBA(ubyte r, ubyte g, ubyte b, ubyte a) { return D3DCOLOR_ARGB(a, r, g, b); } D3DCOLOR D3DCOLOR_XRGB(ubyte r, ubyte g, ubyte b) { return D3DCOLOR_ARGB(0xff, r, g, b); } D3DCOLOR D3DCOLOR_XYUV(ubyte y, ubyte u, ubyte v) { return D3DCOLOR_ARGB(0xff, y, u, v); } int D3DFVF_TEXCOORDSIZE1(int CoordIndex) { return (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16)); } int D3DFVF_TEXCOORDSIZE2(int CoordIndex) { return (D3DFVF_TEXTUREFORMAT2); } int D3DFVF_TEXCOORDSIZE3(int CoordIndex) { return (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16)); } int D3DFVF_TEXCOORDSIZE4(int CoordIndex) { return (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16)); } int D3DPS_VERSION(int _Major, int _Minor) { return (0xffff0000|((_Major)<<8)|(_Minor)); } D3DTRANSFORMSTATETYPE D3DTS_WORLD() { return D3DTS_WORLDMATRIX(0); } D3DTRANSFORMSTATETYPE D3DTS_WORLDMATRIX(ubyte index) { return (D3DTRANSFORMSTATETYPE)(index + 256); } D3DTRANSFORMSTATETYPE D3DTS_WORLD1() { return D3DTS_WORLDMATRIX(1); } D3DTRANSFORMSTATETYPE D3DTS_WORLD2() { return D3DTS_WORLDMATRIX(2); } D3DTRANSFORMSTATETYPE D3DTS_WORLD3() { return D3DTS_WORLDMATRIX(3); } int D3DVS_VERSION(int _Major, int _Minor) { return (0xfffe0000|((_Major)<<8)|(_Minor)); } int MAKEFOURCC(char ch0, char ch1, char ch2, char ch3) { return ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )); } int MAKE_HRESULT(int sev, int fac, int code) { return (HRESULT)(((uint)(sev) << 31) | ((uint)(fac) << 16) | ((uint)(code))); } int MAKE_D3DHRESULT(int code) { return MAKE_HRESULT(1, _FACD3D, code); } // Fix error codes /* const int D3D_OK = S_OK; const int D3DERR_WRONGTEXTUREFORMAT = MAKE_D3DHRESULT(2072); const int D3DERR_UNSUPPORTEDCOLOROPERATION = MAKE_D3DHRESULT(2073); const int D3DERR_UNSUPPORTEDCOLORARG = MAKE_D3DHRESULT(2074); const int D3DERR_UNSUPPORTEDALPHAOPERATION = MAKE_D3DHRESULT(2075); const int D3DERR_UNSUPPORTEDALPHAARG = MAKE_D3DHRESULT(2076); const int D3DERR_TOOMANYOPERATIONS = MAKE_D3DHRESULT(2077); const int D3DERR_CONFLICTINGTEXTUREFILTER = MAKE_D3DHRESULT(2078); const int D3DERR_UNSUPPORTEDFACTORVALUE = MAKE_D3DHRESULT(2079); const int D3DERR_CONFLICTINGRENDERSTATE = MAKE_D3DHRESULT(2081); const int D3DERR_UNSUPPORTEDTEXTUREFILTER = MAKE_D3DHRESULT(2082); const int D3DERR_CONFLICTINGTEXTUREPALETTE = MAKE_D3DHRESULT(2086); const int D3DERR_DRIVERINTERNALERROR = MAKE_D3DHRESULT(2087); const int D3DERR_NOTFOUND = MAKE_D3DHRESULT(2150); const int D3DERR_MOREDATA = MAKE_D3DHRESULT(2151); const int D3DERR_DEVICELOST = MAKE_D3DHRESULT(2152); const int D3DERR_DEVICENOTRESET = MAKE_D3DHRESULT(2153); const int D3DERR_NOTAVAILABLE = MAKE_D3DHRESULT(2154); const int D3DERR_OUTOFVIDEOMEMORY = MAKE_D3DHRESULT(380); const int D3DERR_INVALIDDEVICE = MAKE_D3DHRESULT(2155); const int D3DERR_INVALIDCALL = MAKE_D3DHRESULT(2156); const int D3DERR_DRIVERINVALIDCALL = MAKE_D3DHRESULT(2157); const int D3DERR_WASSTILLDRAWING = MAKE_D3DHRESULT(540); */ extern (C) { extern IID IID_IDirect3D9; extern IID IID_IDirect3DBaseTexture9; extern IID IID_IDirect3DCubeTexture9; extern IID IID_IDirect3DDevice9; extern IID IID_IDirect3DIndexBuffer9; extern IID IID_IDirect3DPixelShader9; extern IID IID_IDirect3DQuery9; extern IID IID_IDirect3DResource9; extern IID IID_IDirect3DStateBlock9; extern IID IID_IDirect3DSurface9; extern IID IID_IDirect3DSwapChain9; extern IID IID_IDirect3DTexture9; extern IID IID_IDirect3DVertexBuffer9; extern IID IID_IDirect3DVertexDeclaration9; extern IID IID_IDirect3DVertexShader9; extern IID IID_IDirect3DVolume9; extern IID IID_IDirect3DVolumeTexture9; } extern (Windows) { export { interface IDirect3D9 : IUnknown { HRESULT CheckDepthStencilMatch(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat); HRESULT CheckDeviceFormat(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat); HRESULT CheckDeviceFormatConversion(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat); HRESULT CheckDeviceMultiSampleType(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels); HRESULT CheckDeviceType(UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT DisplayFormat, D3DFORMAT BackBufferFormat, BOOL Windowed); HRESULT CreateDevice(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3DDevice9 **ppReturnedDeviceInterface); HRESULT EnumAdapterModes(UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode); UINT GetAdapterCount(); HRESULT GetAdapterDisplayMode(UINT Adapter, D3DDISPLAYMODE *pMode); HRESULT GetAdapterIdentifier(UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9 *pIdentifier); UINT GetAdapterModeCount(UINT Adapter, D3DFORMAT Format); HMONITOR GetAdapterMonitor(UINT Adapter); HRESULT GetDeviceCaps(UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9 *pCaps); HRESULT RegisterSoftwareDevice(void *pInitializeFunction); } interface IDirect3DResource9 : IUnknown { HRESULT FreePrivateData(REFGUID refguid); HRESULT GetDevice(IDirect3DDevice9 **ppDevice); DWORD GetPriority(); HRESULT GetPrivateData(REFGUID refguid, void *pData, DWORD *pSizeOfData); D3DRESOURCETYPE GetType(); void PreLoad(); DWORD SetPriority(DWORD PriorityNew); HRESULT SetPrivateData(REFGUID refguid, void *pData, DWORD SizeOfData, DWORD Flags); } interface IDirect3DBaseTexture9 : IDirect3DResource9 { VOID GenerateMipSubLevels(); D3DTEXTUREFILTERTYPE GetAutoGenFilterType(); DWORD GetLevelCount(); DWORD GetLOD(); HRESULT SetAutoGenFilterType(D3DTEXTUREFILTERTYPE FilterType); DWORD SetLOD(DWORD LODNew); } interface IDirect3DCubeTexture9 : IDirect3DBaseTexture9 { HRESULT AddDirtyRect(D3DCUBEMAP_FACES FaceType, RECT *pDirtyRect); HRESULT GetCubeMapSurface(D3DCUBEMAP_FACES FaceType, UINT Level, IDirect3DSurface9 **ppCubeMapSurface); HRESULT GetLevelDesc(UINT Level, D3DSURFACE_DESC *pDesc); HRESULT LockRect(D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT *pLockedRect, RECT *pRect, DWORD Flags); HRESULT UnlockRect(D3DCUBEMAP_FACES FaceType, UINT Level); } interface IDirect3DDevice9 : IUnknown { HRESULT BeginScene(); HRESULT BeginStateBlock(); HRESULT Clear(DWORD Count, D3DRECT *pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil); HRESULT ColorFill(IDirect3DSurface9 *pSurface, RECT *pRect, D3DCOLOR Color); HRESULT CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** ppSwapChain); HRESULT CreateCubeTexture(UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9 **ppCubeTexture, HANDLE* pSharedHandle); HRESULT CreateDepthStencilSurface(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); HRESULT CreateIndexBuffer(UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle); HRESULT CreateOffscreenPlainSurface(UINT Width, UINT Height, D3DFORMAT Format, DWORD Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); HRESULT CreatePixelShader(DWORD *pFunction, IDirect3DPixelShader9** ppShader); HRESULT CreateQuery(D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery); HRESULT CreateRenderTarget(UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle); HRESULT CreateStateBlock(D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB); HRESULT CreateTexture(UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle); HRESULT CreateVertexBuffer(UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle); HRESULT CreateVertexDeclaration(D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl); HRESULT CreateVertexShader(DWORD *pFunction, IDirect3DVertexShader9** ppShader); HRESULT CreateVolumeTexture(UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedTexture); HRESULT DeletePatch(UINT Handle); HRESULT DrawIndexedPrimitive(D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount); HRESULT DrawIndexedPrimitiveUP(D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, void *pIndexData, D3DFORMAT IndexDataFormat, void* pVertexStreamZeroData, UINT VertexStreamZeroStride); HRESULT DrawPrimitive(D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount); HRESULT DrawPrimitiveUP(D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, void* pVertexStreamZeroData, UINT VertexStreamZeroStride); HRESULT DrawRectPatch(UINT Handle, float* pNumSegs, D3DRECTPATCH_INFO* pRectPatchInfo); HRESULT DrawTriPatch(UINT Handle, float* pNumSegs, D3DTRIPATCH_INFO* pTriPatchInfo); HRESULT EndScene(); HRESULT EndStateBlock(IDirect3DStateBlock9 **ppSB); HRESULT EvictManagedResources(); UINT GetAvailableTextureMem(); HRESULT GetBackBuffer(UINT iSwapChain, UINT BackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9 **ppBackBuffer); HRESULT GetClipPlane(DWORD Index, float *pPlane); HRESULT GetClipStatus(D3DCLIPSTATUS9 *pClipStatus); HRESULT GetCreationParameters(D3DDEVICE_CREATION_PARAMETERS *pParameters); HRESULT GetCurrentTexturePalette(UINT *pPaletteNumber); HRESULT GetDepthStencilSurface(IDirect3DSurface9 **ppZStencilSurface); HRESULT GetDeviceCaps(D3DCAPS9 *pCaps); HRESULT GetDirect3D(IDirect3D9 **ppD3D9); HRESULT GetDisplayMode(UINT iSwapChain, D3DDISPLAYMODE *pMode); HRESULT GetFrontBufferData(UINT iSwapChain, IDirect3DSurface9 *pDestSurface); HRESULT GetFVF(DWORD *pFVF); void GetGammaRamp(UINT iSwapChain, D3DGAMMARAMP *pRamp); HRESULT GetIndices(IDirect3DIndexBuffer9 **ppIndexData); HRESULT GetLight(DWORD Index, D3DLIGHT9 *pLight); HRESULT GetLightEnable(DWORD Index, BOOL *pEnable); HRESULT GetMaterial(D3DMATERIAL9 *pMaterial); FLOAT GetNPatchMode(); UINT GetNumberOfSwapChains(); HRESULT GetPaletteEntries(UINT PaletteNumber, PALETTEENTRY *pEntries); HRESULT GetPixelShader(IDirect3DPixelShader9** ppShader); HRESULT GetPixelShaderConstantB(UINT StartRegister, BOOL *pConstantData, UINT BoolCount); HRESULT GetPixelShaderConstantF(UINT StartRegister, float *pConstantData, UINT Vector4fCount); HRESULT GetPixelShaderConstantI(UINT StartRegister, int *pConstantData, UINT Vector4iCount); HRESULT GetRasterStatus(UINT iSwapChain, D3DRASTER_STATUS *pRasterStatus); HRESULT GetRenderState(D3DRENDERSTATETYPE State, DWORD *pValue); HRESULT GetRenderTarget(DWORD RenderTargetIndex, IDirect3DSurface9 **ppRenderTarget); HRESULT GetRenderTargetData(IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface); HRESULT GetSamplerState(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue); HRESULT GetScissorRect(RECT *pRect); BOOL GetSoftwareVertexProcessing(); HRESULT GetStreamSource(UINT StreamNumber, IDirect3DVertexBuffer9 **ppStreamData, UINT *pOffsetInBytes, UINT *pStride); HRESULT GetStreamSourceFreq(UINT StreamNumber, UINT* pDivider); HRESULT GetSwapChain(UINT iSwapChain, IDirect3DSwapChain9 **ppSwapChain); HRESULT GetTexture(DWORD Stage, IDirect3DBaseTexture9 **ppTexture); HRESULT GetTextureStageState(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD *pValue); HRESULT GetTransform(D3DTRANSFORMSTATETYPE State, D3DMATRIX *pMatrix); HRESULT GetVertexDeclaration(IDirect3DVertexDeclaration9** ppDecl); HRESULT GetVertexShader(IDirect3DVertexShader9** ppShader); HRESULT GetVertexShaderConstantB(UINT StartRegister, BOOL *pConstantData, UINT BoolCount); HRESULT GetVertexShaderConstantF(UINT StartRegister, float *pConstantData, UINT Vector4fCount); HRESULT GetVertexShaderConstantI(UINT StartRegister, int *pConstantData, UINT Vector4iCount); HRESULT GetViewport(D3DVIEWPORT9 *pViewport); HRESULT LightEnable(DWORD LightIndex, BOOL bEnable); HRESULT MultiplyTransform(D3DTRANSFORMSTATETYPE State, D3DMATRIX *pMatrix); HRESULT Present(RECT *pSourceRect, RECT *pDestRect, HWND hDestWindowOverride, RGNDATA *pDirtyRegion); HRESULT ProcessVertices(UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9 *pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags); HRESULT Reset(D3DPRESENT_PARAMETERS* pPresentationParameters); HRESULT SetClipPlane(DWORD Index, float *pPlane); HRESULT SetClipStatus(D3DCLIPSTATUS9 *pClipStatus); HRESULT SetCurrentTexturePalette(UINT PaletteNumber); void SetCursorPosition(INT X, INT Y, DWORD Flags); HRESULT SetCursorProperties(UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9 *pCursorBitmap); HRESULT SetDepthStencilSurface(IDirect3DSurface9 *pNewZStencil); HRESULT SetDialogBoxMode(BOOL bEnableDialogs); HRESULT SetFVF(DWORD FVF); void SetGammaRamp(UINT iSwapChain, DWORD Flags, D3DGAMMARAMP *pRamp); HRESULT SetIndices(IDirect3DIndexBuffer9 *pIndexData); HRESULT SetLight(DWORD Index, D3DLIGHT9 *pLight); HRESULT SetMaterial(D3DMATERIAL9 *pMaterial); HRESULT SetNPatchMode(float nSegments); HRESULT SetPaletteEntries(UINT PaletteNumber, PALETTEENTRY *pEntries); HRESULT SetPixelShader(IDirect3DPixelShader9* pShader); HRESULT SetPixelShaderConstantB(UINT StartRegister, BOOL *pConstantData, UINT BoolCount); HRESULT SetPixelShaderConstantF(UINT StartRegister, float *pConstantData, UINT Vector4fCount); HRESULT SetPixelShaderConstantI(UINT StartRegister, int *pConstantData, UINT Vector4iCount); HRESULT SetRenderState(D3DRENDERSTATETYPE State, DWORD Value); HRESULT SetRenderTarget(DWORD RenderTargetIndex, IDirect3DSurface9 *pRenderTarget); HRESULT SetSamplerState(DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value); HRESULT SetScissorRect(RECT *pRect); HRESULT SetSoftwareVertexProcessing(BOOL bSoftware); HRESULT SetStreamSource(UINT StreamNumber, IDirect3DVertexBuffer9 *pStreamData, UINT OffsetInBytes, UINT Stride); HRESULT SetStreamSourceFreq(UINT StreamNumber, UINT FrequencyParameter); HRESULT SetTexture(DWORD Sampler, IDirect3DBaseTexture9 *pTexture); HRESULT SetTextureStageState(DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value); HRESULT SetTransform(D3DTRANSFORMSTATETYPE State, D3DMATRIX *pMatrix); HRESULT SetVertexDeclaration(IDirect3DVertexDeclaration9 *pDecl); HRESULT SetVertexShader(IDirect3DVertexShader9* pShader); HRESULT SetVertexShaderConstantB(UINT StartRegister, BOOL *pConstantData, UINT BoolCount); HRESULT SetVertexShaderConstantF(UINT StartRegister, float *pConstantData, UINT Vector4fCount); HRESULT SetVertexShaderConstantI(UINT StartRegister, int *pConstantData, UINT Vector4iCount); HRESULT SetViewport(D3DVIEWPORT9 *pViewport); BOOL ShowCursor(BOOL bShow); HRESULT StretchRect(IDirect3DSurface9 *pSourceSurface, RECT *pSourceRect, IDirect3DSurface9 *pDestSurface, RECT *pDestRect, D3DTEXTUREFILTERTYPE Filter); HRESULT TestCooperativeLevel(); HRESULT UpdateSurface(IDirect3DSurface9* pSourceSurface, RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, POINT* pDestinationPoint); HRESULT UpdateTexture(IDirect3DBaseTexture9 *pSourceTexture, IDirect3DBaseTexture9 *pDestinationTexture); HRESULT ValidateDevice(DWORD *pNumPasses); } interface IDirect3DIndexBuffer9 : IDirect3DResource9 { HRESULT GetDesc(D3DINDEXBUFFER_DESC *pDesc); HRESULT Lock(UINT OffsetToLock, UINT SizeToLock, VOID **ppbData, DWORD Flags); HRESULT Unlock(); } interface IDirect3DPixelShader9 : IUnknown { HRESULT GetDevice(IDirect3DDevice9 **ppDevice); HRESULT GetFunction(void* pData, UINT* pSizeOfData); } interface IDirect3DQuery9 : IUnknown { HRESULT GetData(void* pData, DWORD dwSize, DWORD dwGetDataFlags); DWORD GetDataSize(); HRESULT GetDevice(IDirect3DDevice9 **pDevice); D3DQUERYTYPE GetType(); HRESULT Issue(DWORD dwIssueFlags); } interface IDirect3DStateBlock9 : IUnknown { HRESULT Apply(); HRESULT Capture(); HRESULT GetDevice(IDirect3DDevice9 **ppDevice); } interface IDirect3DSurface9 : IDirect3DResource9 { HRESULT GetContainer(REFIID iid, void **ppContainer); HRESULT GetDC(HDC *phdc); HRESULT GetDesc(D3DSURFACE_DESC *pDesc); HRESULT LockRect(D3DLOCKED_RECT *pLockedRect, RECT *pRect, DWORD Flags); HRESULT ReleaseDC(HDC hdc); HRESULT UnlockRect(); } interface IDirect3DSwapChain9 : IUnknown { HRESULT GetBackBuffer(UINT BackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9 **ppBackBuffer); HRESULT GetDevice(IDirect3DDevice9 **ppDevice); HRESULT GetDisplayMode(D3DDISPLAYMODE *pMode); HRESULT GetFrontBufferData(IDirect3DSurface9 *pDestSurface); HRESULT GetPresentParameters(D3DPRESENT_PARAMETERS* pPresentationParameters); HRESULT GetRasterStatus(D3DRASTER_STATUS *pRasterStatus); HRESULT Present(RECT *pSourceRect, RECT *pDestRect, HWND hDestWindowOverride, RGNDATA *pDirtyRegion, DWORD dwFlags); } interface IDirect3DTexture9 : IDirect3DBaseTexture9 { HRESULT AddDirtyRect(RECT *pDirtyRect); HRESULT GetLevelDesc(UINT Level, D3DSURFACE_DESC *pDesc); HRESULT GetSurfaceLevel(UINT Level, IDirect3DSurface9 **ppSurfaceLevel); HRESULT LockRect(UINT Level, D3DLOCKED_RECT *pLockedRect, RECT *pRect, DWORD Flags); HRESULT UnlockRect(UINT Level); } interface IDirect3DVertexBuffer9 : IDirect3DResource9 { HRESULT GetDesc(D3DVERTEXBUFFER_DESC *pDesc); HRESULT Lock(UINT OffsetToLock, UINT SizeToLock, VOID **ppbData, DWORD Flags); HRESULT Unlock(); } interface IDirect3DVertexDeclaration9 : IUnknown { HRESULT GetDeclaration(D3DVERTEXELEMENT9* pDecl, UINT* pNumElements); HRESULT GetDevice(IDirect3DDevice9 **ppDevice); } interface IDirect3DVertexShader9 : IUnknown { HRESULT GetDevice(IDirect3DDevice9 **ppDevice); HRESULT GetFunction(void* pData, UINT* pSizeOfData); } interface IDirect3DVolume9 : IUnknown { HRESULT FreePrivateData(REFGUID refguid); HRESULT GetContainer(REFIID riid, void **ppContainer); HRESULT GetDesc(D3DVOLUME_DESC *pDesc); HRESULT GetDevice(IDirect3DDevice9 **ppDevice); HRESULT GetPrivateData(REFGUID refguid, void *pData, DWORD *pSizeOfData); HRESULT LockBox(D3DLOCKED_BOX *pLockedVolume, D3DBOX *pBox, DWORD Flags); HRESULT SetPrivateData(REFGUID refguid, void *pData, DWORD SizeOfData, DWORD Flags); HRESULT UnlockBox(); } interface IDirect3DVolumeTexture9 : IDirect3DBaseTexture9 { HRESULT AddDirtyBox(D3DBOX *pDirtyBox); HRESULT GetLevelDesc(UINT Level, D3DVOLUME_DESC *pDesc); HRESULT GetVolumeLevel(UINT Level, IDirect3DVolume9 **ppVolumeLevel); HRESULT LockBox(UINT Level, D3DLOCKED_BOX *pLockedVolume, D3DBOX *pBox, DWORD Flags); HRESULT UnlockBox(UINT Level); } IDirect3D9* Direct3DCreate9(UINT SDKVersion); int D3DPERF_BeginEvent(D3DCOLOR col, LPCWSTR wszName); int D3DPERF_EndEvent(); void D3DPERF_SetMarker(D3DCOLOR col, LPCWSTR wszName); void D3DPERF_SetRegion(D3DCOLOR col, LPCWSTR wszName); bool D3DPERF_QueryRepeatFrame(); void D3DPERF_SetOptions(DWORD dwOptions); DWORD D3DPERF_GetStatus(); } }

Jun 11 2005
parent Brad Anderson <brad dsource.dot.org> writes:
Nate wrote:
 Thank you for attaching that. The url 
 (http://svn.dsource.org/projects/bindings/trunk/d3d9.d) just prompts me 
 for a password, is it just me?
 

No, it's not just you. I should make it readable by all, and writeable by only registered users of dsource. I'll make the change soon. BA
Jun 11 2005
prev sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Nate" <plummn comdel.net> wrote in message 
news:d8f55k$p57$1 digitaldaemon.com...
I get a messagebox:
 "Success!
 HW VP Works!"

 It then immediately closes.

Nice, it should. BTW, what video card? ;) That's rather important.
 Where did you get the dx9 bindings if I may ask.. on dsource it just 
 prompts for a password over and over (for bindings) unlike all the other 
 projects.

I made them myself, using converted DX9 headers from http://hp.vector.co.jp/authors/VA031566/d_direct3d9/index.html and the Clootie graphics libs for Borland compilers (www.clootie.ru).
Jun 11 2005
next sibling parent Tom S <h3r3tic remove.mat.uni.torun.pl> writes:
Jarrett Billingsley wrote:
 "Nate" <plummn comdel.net> wrote in message 
 news:d8f55k$p57$1 digitaldaemon.com...
 
I get a messagebox:
"Success!
HW VP Works!"

It then immediately closes.

Nice, it should. BTW, what video card? ;) That's rather important.

Same here. GF4Ti200 AGP8x 64MB -- Tomasz Stachowiak /+ a.k.a. h3r3tic +/
Jun 11 2005
prev sibling parent Nate <plummn comdel.net> writes:
Geforce FX 5200 Ultra - 128 MB

Jarrett Billingsley wrote:
 "Nate" <plummn comdel.net> wrote in message 
 news:d8f55k$p57$1 digitaldaemon.com...
 I get a messagebox:
 "Success!
 HW VP Works!"

 It then immediately closes.

Nice, it should. BTW, what video card? ;) That's rather important.
 Where did you get the dx9 bindings if I may ask.. on dsource it just 
 prompts for a password over and over (for bindings) unlike all the other 
 projects.

I made them myself, using converted DX9 headers from http://hp.vector.co.jp/authors/VA031566/d_direct3d9/index.html and the Clootie graphics libs for Borland compilers (www.clootie.ru).

Jun 11 2005
prev sibling next sibling parent David L. Davis <SpottedTiger yahoo.com> writes:
In article <d8f37o$o3n$1 digitaldaemon.com>, Jarrett Billingsley says...
http://www.mtwirefree.net/kbilling/d3d%20test.zip

This is a small app that will attempt to create a Direct3D device using 
hardware vertex processing, and if that's not available, software vertex 
processing.  I'm hoping that this will maybe solve the problem last time 
nonagon was released, when some people were not able to run the program.

Please reply, and tell me the following things:

- What the message box said
- Your video card and how much memory it has

Thanks for your help.  Hopefully this fixes the problem, and if it doesn't, 
I'll have to try something else.

Thanks to Maxime Larose for contacting me through email about this and 
testing some things for me. 

1. "HW VP Works!" 2. GeForce 3 Ti400 64Mb David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html
Jun 11 2005
prev sibling next sibling parent Florian Sonnenberger <nairolf online.de> writes:
Jarrett Billingsley wrote:
 ...
 - What the message box said

 - Your video card and how much memory it has

Nonagon also works. Florian
Jun 11 2005
prev sibling next sibling parent "Alex Stevenson" <ans104 cs.york.ac.uk> writes:
I get the "Success!\nHW VP Works!" message, I'm using an ATI Radeon 9800  
XT with 256Mb
Jun 11 2005
prev sibling next sibling parent reply Derek Parnell <derek psych.ward> writes:
On Sat, 11 Jun 2005 12:29:35 -0400, Jarrett Billingsley wrote:



 Please reply, and tell me the following things:
 
 - What the message box said
 - Your video card and how much memory it has

SW VP Works NVIDIA Vanta (32MB) -- Derek Parnell Melbourne, Australia 12/06/2005 9:44:00 AM
Jun 11 2005
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Derek Parnell" <derek psych.ward> wrote in message 
news:1nl8ds3684567.527xp8lgna5h$.dlg 40tude.net...
 SW VP Works
 NVIDIA Vanta (32MB)

Sweet! You were one of the ones for whom it didn't work before. Now I can release the newest version of nonagon without fear :)
Jun 11 2005
prev sibling next sibling parent "Tony" <talktotony email.com> writes:
I received:

HW VP Works!

Card: nVidia GeForce 6600GT 128MB

Tony
Melbourne, Australia

"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message
news:d8f37o$o3n$1 digitaldaemon.com...
 http://www.mtwirefree.net/kbilling/d3d%20test.zip

 This is a small app that will attempt to create a Direct3D device using
 hardware vertex processing, and if that's not available, software vertex
 processing.  I'm hoping that this will maybe solve the problem last time
 nonagon was released, when some people were not able to run the program.

 Please reply, and tell me the following things:

 - What the message box said
 - Your video card and how much memory it has

 Thanks for your help.  Hopefully this fixes the problem, and if it

 I'll have to try something else.

 Thanks to Maxime Larose for contacting me through email about this and
 testing some things for me.

Jun 11 2005
prev sibling next sibling parent Hasan Aljudy <hasan.aljudy gmail.com> writes:
Jarrett Billingsley wrote:
 http://www.mtwirefree.net/kbilling/d3d%20test.zip
 
 This is a small app that will attempt to create a Direct3D device using 
 hardware vertex processing, and if that's not available, software vertex 
 processing.  I'm hoping that this will maybe solve the problem last time 
 nonagon was released, when some people were not able to run the program.
 
 Please reply, and tell me the following things:
 
 - What the message box said
 - Your video card and how much memory it has
 
 Thanks for your help.  Hopefully this fixes the problem, and if it doesn't, 
 I'll have to try something else.
 
 Thanks to Maxime Larose for contacting me through email about this and 
 testing some things for me. 
 
 

I get "HW VP Works!" Nvidia 4 Ti4200, 128MB
Jun 12 2005
prev sibling next sibling parent Mike Parker <aldacron71 yahoo.com> writes:
Jarrett Billingsley wrote:

 Please reply, and tell me the following things:
 
 - What the message box said
 - Your video card and how much memory it has

HW VP Works Geforce 6600 GT 128 MB
Jun 12 2005
prev sibling next sibling parent Joel Lucsy <jjlucsy usol.com> writes:
HW VP Works
NVidia GeForce Go5200 32Mb

-- 
Joel Lucsy
"The dinosaurs became extinct because they didn't have a space program." 
-- Larry Niven
Jun 12 2005
prev sibling parent John Reimer <brk_6502 yahoo.com> writes:
Jarrett Billingsley wrote:
 http://www.mtwirefree.net/kbilling/d3d%20test.zip
 
 This is a small app that will attempt to create a Direct3D device using 
 hardware vertex processing, and if that's not available, software vertex 
 processing.  I'm hoping that this will maybe solve the problem last time 
 nonagon was released, when some people were not able to run the program.
 
 Please reply, and tell me the following things:
 
 - What the message box said
 - Your video card and how much memory it has
 
 Thanks for your help.  Hopefully this fixes the problem, and if it doesn't, 
 I'll have to try something else.
 
 Thanks to Maxime Larose for contacting me through email about this and 
 testing some things for me. 
 
 

"HW VP Works" ATI Radeon 9000, 32 MB (Laptop)
Jun 12 2005