Ooops
January 26, 2021, 06:07:22 AM

Author Topic: [bmx] Getcaps by tonyg [ 1+ years ago ]  (Read 552 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bmx] Getcaps by tonyg [ 1+ years ago ]
« on: June 29, 2017, 12:28:38 AM »
Title : Getcaps
Author : tonyg
Posted : 1+ years ago

Description : Getcaps is used to check the device capabilities of the primarydevice selected for use in Bmax.
This is DX7 only. You'll need the DX7 docs for many of the fields although some are commented and some are self-explanatory.
Hasn't had extensive testing so feedback, comments and improvements welcome.


Code :
Code: BlitzMax
  1. Rem
  2. /* D3DDEVICEDESC dwDevCaps flags */
  3. 'define D3DDEVCAPS_FLOATTLVERTEX        0x00000001L /* Device accepts floating Point */
  4.  '                                                   /* For post-transform vertex data */
  5. 'define D3DDEVCAPS_SORTINCREASINGZ      0x00000002L /* Device needs data sorted For increasing Z */
  6. 'define D3DDEVCAPS_SORTDECREASINGZ      0X00000004L /* Device needs data sorted For decreasing Z */
  7. 'define D3DDEVCAPS_SORTEXACT            0x00000008L /* Device needs data sorted exactly */
  8.  
  9. 'define D3DDEVCAPS_EXECUTESYSTEMMEMORY  0x00000010L /* Device can use execute buffers from system memory */
  10. 'define D3DDEVCAPS_EXECUTEVIDEOMEMORY   0x00000020L /* Device can use execute buffers from video memory */
  11. 'define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
  12. 'define D3DDEVCAPS_TLVERTEXVIDEOMEMORY  0x00000080L /* Device can use TL buffers from video memory */
  13. 'define D3DDEVCAPS_TEXTURESYSTEMMEMORY  0x00000100L /* Device can texture from system memory */
  14. 'define D3DDEVCAPS_TEXTUREVIDEOMEMORY   0x00000200L /* Device can texture from device memory */
  15. 'If(DIRECT3D_VERSION >= 0x0500)
  16. 'define D3DDEVCAPS_DRAWPRIMTLVERTEX     0x00000400L /* Device can draw TLVERTEX primitives */
  17. 'define D3DDEVCAPS_CANRENDERAFTERFLIP   0x00000800L /* Device can render without waiting For Flip To complete */
  18. 'define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
  19. 'EndIf /* DIRECT3D_VERSION >= 0x0500 */
  20. 'If(DIRECT3D_VERSION >= 0x0600)
  21. 'define D3DDEVCAPS_DRAWPRIMITIVES2         0x00002000L /* Device can support DrawPrimitives2 */
  22. 'define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */
  23. 'define D3DDEVCAPS_DRAWPRIMITIVES2EX       0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
  24. 'EndIf /* DIRECT3D_VERSION >= 0x0600 */
  25. 'If(DIRECT3D_VERSION >= 0x0700)
  26. 'define D3DDEVCAPS_HWTRANSFORMANDLIGHT     0x00010000L /* Device can support transformation And lighting in hardware And DRAWPRIMITIVES2EX must be also */
  27. 'define D3DDEVCAPS_CANBLTSYSTONONLOCAL     0x00020000L /* Device supports a Tex Blt from system memory To non-Local vidmem */
  28. 'define D3DDEVCAPS_HWRASTERIZATION         0x00080000L /* Device has HW acceleration For rasterization */
  29. End Rem
  30.     Const D3DDEVCAPS_CANBLTSYSTONONLOCAL = 131072
  31.     Const D3DDEVCAPS_CANRENDERAFTERFLIP = 2048
  32.     Const D3DDEVCAPS_DRAWPRIMTLVERTEX = 1024
  33.     Const D3DDEVCAPS_FLOATTLVERTEX = 1
  34.     Const D3DDEVCAPS_HWRASTERIZATION = 524288
  35.     Const D3DDEVCAPS_HWTRANSFORMANDLIGHT = 65536
  36.     Const D3DDEVCAPS_SEPARATETEXTUREMEMORIES = 16384
  37.     Const D3DDEVCAPS_SORTDECREASINGZ = 4
  38.     Const D3DDEVCAPS_SORTEXACT = 8
  39.     Const D3DDEVCAPS_SORTINCREASINGZ = 2
  40.     Const D3DDEVCAPS_TEXTURENONLOCALVIDMEM = 4096
  41.     Const D3DDEVCAPS_TEXTURESYSTEMMEMORY = 256
  42.     Const D3DDEVCAPS_TEXTUREVIDEOMEMORY = 512
  43.     Const D3DDEVCAPS_TLVERTEXSYSTEMMEMORY = 64
  44.     Const D3DDEVCAPS_TLVERTEXVIDEOMEMORY = 128
  45.  
  46. '/* D3DPRIMCAPS dwMiscCaps */
  47.  
  48.  
  49.     Const D3DPMISCCAPS_CONFORMANT = 8
  50.     Const D3DPMISCCAPS_CULLCCW = 64
  51.     Const D3DPMISCCAPS_CULLCW = 32
  52.     Const D3DPMISCCAPS_CULLNONE = 16
  53.     Const D3DPMISCCAPS_LINEPATTERNREP = 4
  54.     Const D3DPMISCCAPS_MASKPLANES = 1
  55.     Const D3DPMISCCAPS_MASKZ = 2
  56.  
  57. '/* D3DPRIMCAPS dwRasterCaps */
  58.     Const D3DPRASTERCAPS_ANISOTROPY = 131072
  59.     Const D3DPRASTERCAPS_ANTIALIASEDGES = 4096
  60.     Const D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT = 1024
  61.     Const D3DPRASTERCAPS_DITHER= 1
  62.     Const D3DPRASTERCAPS_FOGRANGE = 65536
  63.     Const D3DPRASTERCAPS_FOGTABLE = 256
  64.     Const D3DPRASTERCAPS_FOGVERTEX = 128
  65.     Const D3DPRASTERCAPS_MIPMAPLODBIAS = 8192
  66.     Const D3DPRASTERCAPS_PAT = 8
  67.     Const D3DPRASTERCAPS_ROP2 = 2
  68.     Const D3DPRASTERCAPS_STIPPLE = 512
  69.     Const D3DPRASTERCAPS_SUBPIXEL= 32
  70.     Const D3DPRASTERCAPS_SUBPIXELX = 64
  71.     Const D3DPRASTERCAPS_XOR = 4
  72.     Const D3DPRASTERCAPS_ZBIAS = 16384
  73.     Const D3DPRASTERCAPS_ZBUFFERLESSHSR = 32768
  74.     Const D3DPRASTERCAPS_ZTEST = 16
  75.  
  76. '/* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps */
  77.     Const D3DPCMPCAPS_ALWAYS = 128
  78.     Const D3DPCMPCAPS_EQUAL = 4
  79.     Const D3DPCMPCAPS_GREATER = 16
  80.     Const D3DPCMPCAPS_GREATEREQUAL = 64
  81.     Const D3DPCMPCAPS_LESS = 2
  82.     Const D3DPCMPCAPS_LESSEQUAL = 8
  83.     Const D3DPCMPCAPS_NEVER = 1
  84.     Const D3DPCMPCAPS_NOTEQUAL = 32
  85.  
  86. '/* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps */
  87.     Const D3DPBLENDCAPS_BOTHINVSRCALPHA =4096
  88.     Const D3DPBLENDCAPS_BOTHSRCALPHA =2048
  89.     Const D3DPBLENDCAPS_DESTALPHA =64
  90.     Const D3DPBLENDCAPS_DESTCOLOR =256
  91.     Const D3DPBLENDCAPS_INVDESTALPHA =128
  92.     Const D3DPBLENDCAPS_INVDESTCOLOR =512
  93.     Const D3DPBLENDCAPS_INVSRCALPHA =32
  94.     Const D3DPBLENDCAPS_INVSRCCOLOR =8
  95.     Const D3DPBLENDCAPS_ONE =2
  96.     Const D3DPBLENDCAPS_SRCALPHA =16
  97.     Const D3DPBLENDCAPS_SRCALPHASAT =1024
  98.     Const D3DPBLENDCAPS_SRCCOLOR =4
  99.     Const D3DPBLENDCAPS_ZERO =1
  100.  
  101. '/* D3DPRIMCAPS dwShadeCaps */
  102.     Const D3DPSHADECAPS_ALPHAFLATBLEND = 4096
  103.     Const D3DPSHADECAPS_ALPHAFLATSTIPPLED = 8192
  104.     Const D3DPSHADECAPS_ALPHAGOURAUDBLEND = 16384
  105.     Const D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED = 32768
  106.     Const D3DPSHADECAPS_ALPHAPHONGBLEND = 65536
  107.     Const D3DPSHADECAPS_ALPHAPHONGSTIPPLED = 131072
  108.     Const D3DPSHADECAPS_COLORFLATMONO = 1
  109.     Const D3DPSHADECAPS_COLORFLATRGB = 2
  110.     Const D3DPSHADECAPS_COLORGOURAUDMONO = 4
  111.     Const D3DPSHADECAPS_COLORGOURAUDRGB = 8
  112.     Const D3DPSHADECAPS_COLORPHONGMONO = 16
  113.     Const D3DPSHADECAPS_COLORPHONGRGB = 32
  114.     Const D3DPSHADECAPS_FOGFLAT = 262144
  115.     Const D3DPSHADECAPS_FOGGOURAUD = 524288
  116.     Const D3DPSHADECAPS_FOGPHONG = 1048576
  117.     Const D3DPSHADECAPS_SPECULARFLATMONO = 64
  118.     Const D3DPSHADECAPS_SPECULARFLATRGB = 128
  119.     Const D3DPSHADECAPS_SPECULARGOURAUDMONO = 256
  120.     Const D3DPSHADECAPS_SPECULARGOURAUDRGB = 512
  121.     Const D3DPSHADECAPS_SPECULARPHONGMONO = 1024
  122.     Const D3DPSHADECAPS_SPECULARPHONGRGB = 2048
  123.  
  124. Rem
  125. /* D3DPRIMCAPS dwTextureCaps */
  126.  * Perspective-correct texturing is supported
  127. #define D3DPTEXTURECAPS_PERSPECTIVE     0x00000001L
  128.  * Power-of-2 texture dimensions are required*/
  129. #define D3DPTEXTURECAPS_POW2            0x00000002L
  130.  * Alpha in texture pixels is supported*/
  131. #define D3DPTEXTURECAPS_ALPHA           0x00000004L
  132.  * Color-keyed textures are supported*/
  133. #define D3DPTEXTURECAPS_TRANSPARENCY    0x00000008L
  134.  * obsolete, see D3DPTADDRESSCAPS_BORDER
  135. #define D3DPTEXTURECAPS_BORDER          0x00000010L
  136.  * Only square textures are supported*/
  137. #define D3DPTEXTURECAPS_SQUAREONLY      0x00000020L
  138.  * Texture indices are Not scaled by the texture size prior
  139.  * To interpolation.*/
  140. #define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L
  141.  * Device can draw alpha from texture palettes*/
  142. #define D3DPTEXTURECAPS_ALPHAPALETTE    0x00000080L
  143.  * Device can use non-POW2 textures If:
  144.  *  1) D3DTEXTURE_ADDRESS is set To Clamp For this texture's stage
  145.  *  2) D3DRS_WRAP(N) is zero For this texture's coordinates
  146.  *  3) mip mapping is Not enabled (use magnification filter only)*/
  147. #define D3DPTEXTURECAPS_NONPOW2CONDITIONAL  0x00000100L
  148. // 0x00000200L unused
  149.  * Device can divide transformed texture coordinates by the
  150.  * COUNTth texture coordinate (can do D3DTTFF_PROJECTED)*/
  151. #define D3DPTEXTURECAPS_PROJECTED  0x00000400L
  152.  * Device can do cubemap textures*/
  153. #define D3DPTEXTURECAPS_CUBEMAP           0x00000800L
  154. #define D3DPTEXTURECAPS_COLORKEYBLEND     0x00001000L
  155. End Rem
  156.  
  157.     Const D3DPTEXTURECAPS_ALPHA = 4
  158.     Const D3DPTEXTURECAPS_BORDER = 16
  159.     Const D3DPTEXTURECAPS_COLORKEYBLEND = 4096
  160.     Const D3DPTEXTURECAPS_CUBEMAP = 1024
  161.     Const D3DPTEXTURECAPS_NONPOW2CONDITIONAL = 256
  162.     Const D3DPTEXTURECAPS_PERSPECTIVE = 1
  163.     Const D3DPTEXTURECAPS_POW2 = 2
  164.     Const D3DPTEXTURECAPS_SQUAREONLY = 32
  165.     Const D3DPTEXTURECAPS_TRANSPARENCY = 8
  166.  
  167. '/* D3DPRIMCAPS dwTextureFilterCaps */
  168.  
  169.     Const D3DPTFILTERCAPS_LINEAR = 2
  170.     Const D3DPTFILTERCAPS_LINEARMIPLINEAR = 32
  171.     Const D3DPTFILTERCAPS_LINEARMIPNEAREST = 16
  172.     Const D3DPTFILTERCAPS_MAGFAFLATCUBIC = 134217728
  173.     Const D3DPTFILTERCAPS_MAGFANISOTROPIC = 67108864
  174.     Const D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC =  268435456
  175.     Const D3DPTFILTERCAPS_MAGFLINEAR = 16777216
  176.     Const D3DPTFILTERCAPS_MAGFPOINT = 8388608
  177.     Const D3DPTFILTERCAPS_MINFANISOTROPIC = 1024
  178.     Const D3DPTFILTERCAPS_MINFLINEAR = 512
  179.     Const D3DPTFILTERCAPS_MINFPOINT = 256
  180.     Const D3DPTFILTERCAPS_MIPFLINEAR = 131072
  181.     Const D3DPTFILTERCAPS_MIPFPOINT = 65536
  182.     Const D3DPTFILTERCAPS_MIPLINEAR = 8
  183.     Const D3DPTFILTERCAPS_MIPNEAREST = 4
  184.     Const D3DPTFILTERCAPS_NEAREST = 1
  185.  
  186. '/* D3DPRIMCAPS dwTextureBlendCaps */
  187. 'Replaced by TextureOpCaps
  188.  
  189. '/* D3DPRIMCAPS dwTextureAddressCaps */
  190.     Const D3DPTADDRESSCAPS_BORDER = 8
  191.     Const D3DPTADDRESSCAPS_CLAMP = 4
  192.     Const D3DPTADDRESSCAPS_INDEPENDENTUV = 16
  193.     Const D3DPTADDRESSCAPS_MIRROR = 2
  194.     Const D3DPTADDRESSCAPS_WRAP = 1
  195.  
  196. '/* D3DDEVICEDESC dwStencilCaps */
  197.     Const D3DSTENCILCAPS_DECR = 128
  198.     Const D3DSTENCILCAPS_DECRSAT = 16
  199.     Const D3DSTENCILCAPS_INCR = 64
  200.     Const D3DSTENCILCAPS_INCRSAT = 8
  201.     Const D3DSTENCILCAPS_INVERT = 32
  202.     Const D3DSTENCILCAPS_KEEP = 1
  203.     Const D3DSTENCILCAPS_REPLACE = 4
  204.  
  205. '/* D3DDEVICEDESC dwTextureOpCaps */
  206.     Const D3DTEXOPCAPS_ADD = 64
  207.     Const D3DTEXOPCAPS_ADDSIGNED = 128
  208.     Const D3DTEXOPCAPS_ADDSIGNED2X = 256
  209.     Const D3DTEXOPCAPS_ADDSMOOTH = 1024
  210.     Const D3DTEXOPCAPS_BLENDCURRENTALPHA = 32768
  211.     Const D3DTEXOPCAPS_BLENDDIFFUSEALPHA = 2048
  212.     Const D3DTEXOPCAPS_BLENDFACTORALPHA = 8192
  213.     Const D3DTEXOPCAPS_BLENDTEXTUREALPHA = 4096
  214.     Const D3DTEXOPCAPS_BLENDTEXTUREALPHAPM = 16384
  215.     Const D3DTEXOPCAPS_BUMPENVMAP = 2097152
  216.     Const D3DTEXOPCAPS_BUMPENVMAPLUMINANCE = 4194304
  217.     Const D3DTEXOPCAPS_DISABLE = 1
  218.     Const D3DTEXOPCAPS_DOTPRODUCT3 = 8388608
  219.     Const D3DTEXOPCAPS_MODULATE = 8
  220.     Const D3DTEXOPCAPS_MODULATE2X = 16
  221.     Const D3DTEXOPCAPS_MODULATE4X = 32
  222.     Const D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR = 131072
  223.     Const D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA = 262144
  224.     Const D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR = 524288
  225.     Const D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA = 1048576
  226.     Const D3DTEXOPCAPS_PREMODULATE = 65536
  227.     Const D3DTEXOPCAPS_SELECTARG1 = 2
  228.     Const D3DTEXOPCAPS_SELECTARG2 = 4
  229.     Const D3DTEXOPCAPS_SUBTRACT = 512
  230.  
  231. Rem
  232. /* D3DDEVICEDESC dwFVFCaps flags */
  233.  
  234. #define D3DFVFCAPS_TEXCOORDCOUNTMASK    0x0000ffffL /* mask For texture coordinate count Field */
  235. #define D3DFVFCAPS_DONOTSTRIPELEMENTS   0x00080000L /* Device prefers that vertex elements Not be stripped */
  236. End Rem
  237.  Const   D3DFVFCAPS_DONOTSTRIPELEMENTS = 524288
  238.  Const   D3DFVFCAPS_TEXCOORDCOUNTMASK = 65535
  239.  
  240.  
  241.  
  242.  
  243. Rem
  244.  * These are the flags in the D3DDEVICEDESC7.dwVertexProcessingCaps Field
  245.  */
  246. /* device can do texgen */
  247. #define D3DVTXPCAPS_TEXGEN              0x00000001L
  248. /* device can do IDirect3DDevice7 colormaterialsource ops */
  249. #define D3DVTXPCAPS_MATERIALSOURCE7     0x00000002L
  250. /* device can do vertex fog */
  251. #define D3DVTXPCAPS_VERTEXFOG           0x00000004L
  252. /* device can do directional lights */
  253. #define D3DVTXPCAPS_DIRECTIONALLIGHTS   0x00000008L
  254. /* device can do positional lights (includes Point And spot) */
  255. #define D3DVTXPCAPS_POSITIONALLIGHTS    0x00000010L
  256. /* device can do Local viewer */
  257. #define D3DVTXPCAPS_LOCALVIEWER         0x00000020L
  258. End Rem
  259.     Const D3DVTXPCAPS_DIRECTIONALLIGHTS = 8
  260.     Const D3DVTXPCAPS_MATERIALSOURCE7 = 2
  261.     Const D3DVTXPCAPS_NONLOCALVIEWER = 32
  262.     Const D3DVTXPCAPS_POSITIONALLIGHTS = 16
  263.     Const D3DVTXPCAPS_TEXGEN = 1
  264.     Const D3DVTXPCAPS_VERTEXFOG = 4
  265.  
  266. 'Not sure how to read the GUID info.
  267. 'The first dword contains the interface type listed in DX7 docs.
  268. 'For default Bmax this is likely to be IDIRECT3D.
  269. 'The rest must mean something but I use them here as 'fillers'.
  270.  
  271. Type TG_D3DDeviceDesc7
  272.         Field dwDevCaps:Int
  273.         Field dwSize_LINE:Int               'Size of structure
  274.     Field dwMiscCaps_LINE:Int           'Miscellaneous capabilities
  275.     Field dwRasterCaps_LINE:Int         'Raster capabilities
  276.     Field dwZCmpCaps_LINE:Int           'Z-comparison capabilities
  277.     Field dwSrcBlendCaps_LINE:Int       'Source-blending capabilities
  278.     Field dwDestBlendCaps_LINE:Int      'Destination-blending capa bilities
  279.     Field dwAlphaCmpCaps_LINE:Int       'Alpha-test-comparison capabilities
  280.     Field dwShadeCaps_LINE:Int          'Shading capabilities
  281.     Field dwTextureCaps_LINE:Int        'Texture capabilities
  282.     Field dwTextureFilterCaps_LINE:Int  'Texture-filtering capabilities
  283.     Field dwTextureBlendCaps_LINE:Int   'Texture-blending capabilities
  284.     Field dwTextureAddressCaps_LINE:Int 'Texture-addressing capabilities
  285.     Field dwStippleWidth_LINE:Int       'Stipple width
  286.     Field dwStippleHeight_LINE:Int      'Stipple height
  287.     Field dwSize_TRI:Int               'Size of structure
  288.     Field dwMiscCaps_TRI:Int           'Miscellaneous capabilities
  289.     Field dwRasterCaps_TRI:Int         'Raster capabilities
  290.     Field dwZCmpCaps_TRI:Int           'Z-comparison capabilities
  291.     Field dwSrcBlendCaps_TRI:Int       'Source-blending capabilities
  292.     Field dwDestBlendCaps_TRI:Int      'Destination-blending capa bilities
  293.     Field dwAlphaCmpCaps_TRI:Int       'Alpha-test-comparison capabilities
  294.     Field dwShadeCaps_TRI:Int          'Shading capabilities
  295.     Field dwTextureCaps_TRI:Int        'Texture capabilities
  296.     Field dwTextureFilterCaps_TRI:Int  'Texture-filtering capabilities
  297.     Field dwTextureBlendCaps_TRI:Int   'Texture-blending capabilities
  298.     Field dwTextureAddressCaps_TRI:Int 'Texture-addressing capabilities
  299.     Field dwStippleWidth_TRI:Int       'Stipple width
  300.     Field dwStippleHeight_TRI:Int      'Stipple height
  301.         Field      dwDeviceRenderBitDepth:Int
  302.         Field      dwDeviceZBufferBitDepth:Int
  303.         Field      dwMinTextureWidth:Int
  304.         Field      dwMinTextureHeight:Int
  305.         Field      dwMaxTextureWidth:Int
  306.         Field      dwMaxTextureHeight:Int
  307.         Field      dwMaxTextureRepeat:Int
  308.         Field      dwMaxTextureAspectRatio:Int
  309.         Field      dwMaxAnisotropy:Float
  310.         Field      dvGuardBandLeft:Float
  311.         Field      dvGuardBandTop:Float
  312.         Field      dvGuardBandRight:Float
  313.         Field      dvGuardBandBottom:Float
  314.         Field      dvExtentsAdjust:Float
  315.         Field      dwStencilCaps:Int
  316.         Field      dwFVFCaps:Int
  317.         Field      dwTextureOpCaps:Int
  318.         Field      wMaxTextureBlendStages:Short
  319.         Field      wMaxSimultaneousTextures:Short
  320.         Field      dwMaxActiveLights:Int
  321.         Field      dvMaxVertexW:Float
  322.         Field      GUID_Interface_type:Int
  323.         Field      GUID_1:Short
  324.         Field      GUID_2:Short
  325.         Field      GUID_3:Byte
  326.         Field      GUID_4:Byte
  327.         Field      GUID_5:Byte
  328.         Field      GUID_6:Byte
  329.         Field      GUID_7:Byte
  330.         Field      GUID_8:Byte
  331.         Field      GUID_9:Byte
  332.         Field      GUID_10:Byte
  333.         Field      wMaxUserClipPlanes:Short
  334.         Field      wMaxVertexBlendMatrices:Short
  335.         Field      dwVertexProcessingCaps:Int
  336.         Field      dwReserved1:Int
  337.         Field      dwReserved2:Int
  338.         Field      dwReserved3:Int
  339.         Field      dwReserved4:Int
  340. End Type
  341. Graphics 640,480
  342. Local mycaps:TG_D3DDEVICEDESC7 = New TG_D3DDEVICEDESC7
  343. D3D7GraphicsDriver().Direct3DDevice7().getcaps mycaps
  344. Print "MinTextureWidth " + mycaps.dwMinTextureWidth
  345. Print "MinTextureHeight " + mycaps.dwMinTextureHeight
  346. Print "MaxTextureWidth " + mycaps.dwMaxTextureWidth
  347. Print "MaxTextureHeight " + mycaps.dwMaxTextureHeight
  348. Print "MaxTextureBlendStages " + mycaps.wMaxTextureBlendStages
  349. Print "MaxActiveLights " + mycaps.dwMaxActiveLights
  350. If mycaps.dwTextureOpCaps & D3DTEXOPCAPS_MODULATE2X Print "Device can Mod2X"
  351. If mycaps.dwTextureCaps_LINE & D3DPTEXTURECAPS_POW2 Print "Power-of-2 texture dimensions are required"
  352. If mycaps.dwDevCaps & D3DDEVCAPS_HWRASTERIZATION Print "Device has HW acceleration For rasterization"
  353. If mycaps.dwRasterCaps_LINE & D3DPRASTERCAPS_ANTIALIASEDGES
  354.    Print "The device can antialias lines forming the convex outline of objects."
  355. Else
  356.    Print "The device can NOT antialias lines forming the convex outline of objects."
  357. EndIf


Comments :


tonyg(Posted 1+ years ago)

 Edited for 1.24 compat.


WendellM(Posted 1+ years ago)

 This is handy, thanks, and so is this addition:<a href="http://blitzbasic.com/Community/posts.php?topic=68871#769987" target="_blank">http://blitzbasic.com/Community/posts.php?topic=68871#769987[/url]


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal