| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>SetGfxDriver index</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- index = index number obtained with CountGfxDrivers command
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- 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 />
-
<br />
- 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 />
-
<br />
- Normally, this won't be necessary with 2D programming.
- </td>
- </tr>
- </table>
- <h1><a href=../2d_examples/SetGfxDriver.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; GfxDriver Examples
<br />
-
<br />
- ; Count how many drivers there are
<br />
- totalDrivers=CountGfxDrivers()
<br />
- Print "Choose a driver to use:"
<br />
-
<br />
- ; Go through them all and print their names (most people will have only 1)
<br />
- For t = 1 To totalDrivers
<br />
- Print t+") " + GfxDriverName$(t)
<br />
- Next
<br />
-
<br />
- ; Let the user choose one
<br />
- driver=Input("Enter Selection:")
<br />
-
<br />
- ; Set the driver!
<br />
- SetGfxDriver driver
<br />
- Print "Your driver has been selected!"
<br />
- </td>
- </tr>
- </table>
- <br>
- <a target=_top href=../index.htm>Index</a><br>
- <br>
- 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>
- </html>
|