在ogre中一个viewport是对一个Camera所拍摄到的场景的反映.
| virtual |
Adds a viewport to the rendering target.
-
Remarks:
- A viewport is the rectangle into which rendering output is sent. This method adds a viewport to the render target, rendering from the supplied camera. The rest of the parameters are only required if you wish to add more than one viewport to a single rendering target. Note that size information passed to this method is passed as a parametric, i.e. it is relative rather than absolute. This is to allow viewports to automatically resize along with the target.
-
Parameters:
-
cam The camera from which the viewport contents will be rendered (mandatory) ZOrder The relative order of the viewport with others on the target (allows overlapping viewports i.e. picture-in-picture). Higher ZOrders are on top of lower ones. The actual number is irrelevant, only the relative ZOrder matters (you can leave gaps in the numbering) left The relative position of the left of the viewport on the target, as a value between 0 and 1. top The relative position of the top of the viewport on the target, as a value between 0 and 1. width The relative width of the viewport on the target, as a value between 0 and 1. height The relative height of the viewport on the target, as a value between 0 and 1.