Microsoft SDK for Java

createViewport

This method of the Direct3dRM Class creates a viewport on a device with device coordinates (xPos, yPos) to (xPos + width, yPos + height).

Syntax

public Direct3dRMViewport createViewport(Direct3dRMDevice dev, Direct3dRMFrame fr, int l, int t, int w, int h);

Return Value

Returns the Direct3dRMViewport object if successful; otherwise, null.

Parameters

dev The device that the viewport is to be created on.
fr The frame that describes the position and direction of the view.
l The x-coordinate of the upper-left corner of the viewport, in device coordinates.
t The y-coordinate of the upper-left corner of the viewport, in device coordinates.
w Width of the viewport, in device coordinates.
h Height of the viewport, in device coordinates.

Remarks

The viewport displays objects in the scene that contains the camera, with the view direction and up vector taken from the camera.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.