Viewport Structure |
Language: |
Defines the window dimensions of a render target surface onto which a 3-D volume projects.
Visual Basic Public Structure Viewport C# public struct Viewport C++ public value class Viewport sealed JScript In JScript, you can use structures, but you cannot define your own.
The X, Y, Width, and Height members describe the position and dimensions of the viewport on the render-target surface. Usually, applications render to the entire target surface; when rendering on a 640x480 surface, these members should be 0, 0, 640, and 480, respectively. The MinZ and MaxZ properties typically are set to 0.0 and 1.0, but can be set to other values to achieve specific effects. For example, setting them both to 0.0 can force the system to render objects to the foreground of a scene, while setting both to 1.0 can force the objects into the background.
When the viewport parameters for a device change (due to the use of the Device.Viewport property), the driver builds a new transformation matrix.
Namespace Microsoft.DirectX.Direct3D Assembly Microsoft.DirectX.Direct3D (microsoft.directx.direct3d.dll) Strong Name Microsoft.DirectX.Direct3D, Version=1.0.900.0, Culture=neutral, PublicKeyToken=d3231b57b74a1492
Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center