Drawing an object on screen requires us to specify the screen parameters. Creating a swapchain is not enough--we don't always need to draw to the entire available image area. There are situations in which we just want to draw a smaller picture in the whole image, such as the reflection in the back mirror of a car or half of the image in split-screen multiplayer games. We define the area of the image to which we want to draw through a pipeline viewport and scissor test states.
Specifying a pipeline viewport and scissor test state
Getting ready
Specifying parameters for a viewport and scissor states requires us to provide a separate set of parameters for both the viewport and scissor test, but the number of elements in both sets must be equal. To keep parameters...