Graphics Reference
In-Depth Information
The following primitives can be drawn in OpenGL ES 3.0:
• Triangles
• Lines
• Point sprites
Triangles
Triangles represent the most common method used to describe a
geometry object rendered by a 3D application. The triangle primitives
supported by OpenGL ES are GL_TRIANGLES , GL_TRIANGLE_STRIP , and
GL_TRIANGLE_FAN . Figure 7-1 shows examples of supported triangle
primitive types.
v 1
v 3
v 3
v 4
v 1
v 5
v 0
v 4
v 2
v 2
v 0
GL_TRIANGLES
GL_TRIANGLE_STRIP
v 2
v 3
v 4
v 1
v 0
GL_TRIANGLE_FAN
Figure 7-1
Triangle Primitive Types
GL_TRIANGLES draws a series of separate triangles. In Figure 7-1, two
triangles given by vertices (v 0 , v 1 , v 2 ) and (v 3 , v 4 , v 5 ) are drawn. A total
of n/3 triangles are drawn, where n is the number of indices specified as
count in glDraw*** APIs mentioned previously.
GL_TRIANGLE_STRIP draws a series of connected triangles. In the example
shown in Figure 7-1, three triangles are drawn given by (v 0 , v 1 , v 2 ), (v 2 , v 1 , v 3 )
(note the order), and (v 2 , v 3 , v 4 ). A total of (n-2) triangles are drawn, where
n is the number of indices specified as count in glDraw*** APIs.
 
 
Search WWH ::




Custom Search