Retrieving Information About A Device Driver
Since guard band clipping is fully supported by DirectX and the Windows Driver Model, it is easy for a developer to query a device's guard band clipping settings without knowledge of any hardware specific commands.
The following code snippet retrieves the offset of the guard band and displays them on a dialog box:
// ... Device creation ... - renderingDevice is assumed to be the name of the Microsoft.DirectX.Direct3D.Device which is queried.
MessageBox.Show ("Top margin: " + renderingDevice.DeviceCaps.GuardBandTop.ToString);
MessageBox.Show ("Left margin: " + renderingDevice.DeviceCaps.GuardBandLeft.ToString);
MessageBox.Show ("Right margin: " + renderingDevice.DeviceCaps.GuardBandRight.ToString);
MessageBox.Show ("Bottom margin: " + renderingDevice.DeviceCaps.GuardBandBottom.ToString);
'' // ... Device disposal ...
Read more about this topic: Guard-band Clipping
Famous quotes containing the words information, device and/or driver:
“English literature is a kind of training in social ethics.... English trains you to handle a body of information in a way that is conducive to action.”
—Marilyn Butler (b. 1937)
“It is my hope to be able to prove that television is the greatest step forward we have yet made in the preservation of humanity. It will make of this Earth the paradise we have all envisioned, but have never seen.”
—Joseph ODonnell. Clifford Sanforth. Professor James Houghland, Murder by Television, just before he demonstrates his new television device (1935)
“God help the horse, and the driver too!
And the people and beasts who have never a friend!
For the driver easily might have been you,
And the horse be me by a different end!
And nobody knows how their days will cease!
And the poor, when theyre old, have little of peace!”
—James Kenneth Stephens (18821950)