Each point specified in this sampleis paired with a point on the opposite side of a circle. Listing 3.4,from the LINES sample program on the CD, shows a more complex sample that drawsa series of lines fanned around in a circle. ![]() If you specify an odd number ofvertices for GL_LINES, the last vertex is just ignored. For every twovertices specified, a single line is drawn. Note here that two vertices specify a single primitive. The following short section ofcode draws a single line between two points (0,0,0) and (50,50,50): glBegin(GL_LINES) glVertex3f(0.0f, 0.0f, 0.0f) glVertex3f(50.0f, 50.0f, 50.0f) glEnd() This is exactlywhat the next primitive, GL_LINES, does. The next logicalstep is to specify two vertices and draw a line between them. The GL_POINTS primitive we have been using thus far is reasonablystraightforward for each vertex specified, it draws a point.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |