Graphics Programs Reference
In-Depth Information
Figure 3-4
.
Rendering graphics on the entire screen
Figures 3-4
and
3-5
are screen shots from the
GL CUBEMAP TEXTURE
application
(inside the source code for
Chapter 5
).
Figure 3-4
shows the screen shot for the de-
fault viewport setting - that is,
glViewport(0, 0, width, height)
. This
setting fits the viewport on the display screen exactly.
Figure 3-5
.
Setting the viewport as one-fourth of screen area
By calling
glViewport(0, 0, width/2, height/2);
the viewport area
is reduced to a quarter of the display screen, as shown in
Figure 3-5
.
You can modi-
Search WWH ::
Custom Search