This answer is restricted. Please login to view the answer of this question.Login Now
In OpenGL, the term line refers to a line segment. There are easy ways to specify a connected In all cases the lines constituting the connected series are specified in terms of the vertices at their endpoints.
Below is the image of two connected series of line segments.
With OpenGL, we can specify lines with different widths and lines that are stippled in various ways-dotted, dashed and so on. Drawing a line with OpenGL is apparently quite simple using the following code.
glBegin(GL_LINES); glVertex2i(x0, y0); glVertex2i(x1, y1); glEnd();
This method uses both object space and image space method. The depth sorting method performs following two basic functions.
The intensity values for farthest surface are entered into the refresh buffer. The farthest polygon is displayed first, then the second farthest polygon and so on. After all surfaces have been processed, the refresh buffer stores the final intensity values for all visible surfaces.
When there are a few objects in the scene, then this method can be very fast. However, as the number of objects increases, the sorting process can become very complex and time consuming.
Click here to submit your answer.