GfxDriverCaps3D ( )
Parameters
| None. |
Description
|
Returns the capability level of the current 3D graphics driver. Classic Blitz3D used this to sniff what the player's card could do before committing to fancy effects: 100 meant a plain DirectX 7 driver, and 110 meant one that also supported cubic environment maps, so games would check for 110 before switching their shiny objects to cubemapped reflections. The Blitz3D+ DirectX 12 renderer always returns 120. There is no capability roulette on the modern runtime - every machine that runs the game reports the same level - so for new code the command is mostly useful as a runtime check: "am I on the modern renderer?" Classic code that tests for 110-or-better keeps working, since 120 passes. Call it after Graphics3D - it queries the current 3D scene, and there is no driver to ask before a 3D mode is set. See also: HWTexUnits, GfxDriver3D, CountGfxModes3D, GfxMode3DExists. |
Example
; GfxDriverCaps3D Example ; ----------------------- ; GfxDriverCaps3D needs a 3D graphics mode before it can be called Graphics3D 640,480,0,2 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,0,-4 light=CreateLight() RotateEntity light,45,45,0 ; A spinning cube so the caps report has some company cube=CreateCube() PositionEntity cube,1.5,-1,3 ; Ask the driver for its capability level caps=GfxDriverCaps3D() While Not KeyDown(1) TurnEntity cube,0,1,0 ; Arrow keys move the camera If KeyDown(200) Then MoveEntity camera,0,0,0.1 If KeyDown(208) Then MoveEntity camera,0,0,-0.1 If KeyDown(203) Then TurnEntity camera,0,1,0 If KeyDown(205) Then TurnEntity camera,0,-1,0 RenderWorld Text 0,0,"Arrow keys: move camera Esc: exit" Text 0,20,"GfxDriverCaps3D() = "+caps Text 0,60,"Caps level guide:" Text 0,80," 100 - classic DirectX 7 driver, no cubic environment maps" Text 0,100," 110 - classic DirectX 7 driver with cubic environment maps" Text 0,120," 120 - Blitz3D+ DirectX 12 renderer (always reported here)" Flip Wend End
Index