io7m
io7m-jcanephora 0.44.1
3.18
JCGLViewportsType

- 3.18.1. Description
- 3.18.2. Usage example
- 3.18.3. State

3.18.1
Description
1
The JCGLViewportsType interface provides functions for controlling the current viewport.
3.18.2
Usage example
1
The following code configures a 640x480 viewport:
3.18.2.1. Viewport

    JCGLViewportsType g;

    AreaInclusiveUnsignedLType area =
      AreaInclusiveUnsignedL.of(
        new UnsignedRangeInclusiveL(0, 639),
        new UnsignedRangeInclusiveL(0, 479)
      );

    g.viewportSet(area);

3.18.3
State
1
The current viewport state is global to a given context; when modified, it is modified for all subsequent rendering operations on that context until modified again.