io7m
io7m-jcanephora 0.50.0
3.19
JCGLViewportsType

- 3.19.1. Description
- 3.19.2. Usage example
- 3.19.3. State

3.19.1
Description
1
The JCGLViewportsType interface provides functions for controlling the current viewport.
3.19.2
Usage example
1
The following code configures a 640x480 viewport:
3.19.2.1. Viewport

    JCGLViewportsType g;

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

    g.viewportSet(area);

3.19.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.