Export (0) Print
Expand All

Viewport Structure

Defines the window dimensions of a render target surface onto which a 3-D volume projects.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

public struct Viewport

A view port is a rectangle that defines how a 3-D scene is rendered into a 2-D window. A view port also defines an area on a device into which objects are rendered.

A view port structure is a rendering surface such as a 3-D renderer that writes per-pixel scene data (such as color) to a render target.

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 because of the Viewport property value of a Device, the driver builds a new transformation matrix.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Compact Framework

Supported in: 3.5, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft