SetGfxDriver.htm 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>SetGfxDriver index</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. index = index number obtained with CountGfxDrivers command
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. Some computers may have more than one video card and/or video driver installed (a good example is a computer system with a primary video card and a Voodoo2 or other pass-through card). <br />
  21. <br />
  22. Once you know how many drivers there are using the CountGfxDrivers(), you can iterate through them with GfxDriverName$ and display them for the user to choose from. Once the user has chosen (or you decide), you can set the graphics driver with this command. <br />
  23. <br />
  24. Normally, this won't be necessary with 2D programming.
  25. </td>
  26. </tr>
  27. </table>
  28. <h1><a href=../2d_examples/SetGfxDriver.bb>Example</a></h1>
  29. <table>
  30. <tr>
  31. <td>
  32. ; GfxDriver Examples <br />
  33. <br />
  34. ; Count how many drivers there are <br />
  35. totalDrivers=CountGfxDrivers() <br />
  36. Print "Choose a driver to use:" <br />
  37. <br />
  38. ; Go through them all and print their names (most people will have only 1) <br />
  39. For t = 1 To totalDrivers <br />
  40. Print t+") " + GfxDriverName$(t) <br />
  41. Next <br />
  42. <br />
  43. ; Let the user choose one <br />
  44. driver=Input("Enter Selection:") <br />
  45. <br />
  46. ; Set the driver! <br />
  47. SetGfxDriver driver <br />
  48. Print "Your driver has been selected!" <br />
  49. </td>
  50. </tr>
  51. </table>
  52. <br>
  53. <a target=_top href=../index.htm>Index</a><br>
  54. <br>
  55. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=SetGfxDriver&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  56. </html>