Compartilhar via


Viewport Structure

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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)

Syntax

'Declaration
Public Structure Viewport
'Usage
Dim instance As Viewport
public struct Viewport
public value class Viewport
[<SealedAttribute>]
type Viewport =  struct end

Remarks

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.

Thread Safety

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

Platforms

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.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Viewport Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace

Other Resources

Mobile Direct3D Programming in the .NET Compact Framework