Graphics Programs Reference
In-Depth Information
Figure 3-22 . GL CUBE application
State Management
As you already know, there are various stages in the ES 2.0 rendering pipeline. These
stages have states that can be enabled or disabled. Here, we examine two important
stages in the rendering pipeline.
Cull Face
When we render triangle primitives, the rendering pipeline allows us to specify
which triangles are back-facing and which are front-facing. This is not by virtue
of face pointing viewer, but is based on the following orientations of the (vertices
of) triangle—Clockwise (CW) and Counter-Clockwise (CCW). Then, using state
GL_CULL_FACE , we can cull (discard) triangles that are back-facing or front-fa-
Note With the help of culling, our application does not send draw
commands for discarded objects. This is useful, as it can improve
the rendering performance.
To understand this, import the archive file Chapter3/ . This
loads the GLCULLFACE application into your workspace (this application is almost
Search WWH ::

Custom Search