In OpenGL you can draw only back-facing polygons, or only front facing polygons.
ID: 3670539 • Letter: I
Question
In OpenGL you can draw only back-facing polygons, or only front facing polygons. If you render the manifold(front facing polygons), then clear the frame-buffer but not the depth buffer, then again render only the back facing polygons. What do expect to see? Assume that the “thickness” of a line is an attribute of a line. Thickness of three means that the line would be drawn three pixels “thick”. In question, if the thickness of the line was one and now is increased to three only for the second rendering (rendering of back faces), what do you expect to see?
Explanation / Answer
Answer:
We will see the back facing triangles. The first render pass will result in the depth buffer having the depth values of the triangles that are front facing. The second render pass we are rendering the back facing triangles, hence those that have the greatest depth value.
Every triangle that is rasterized will have its depth value compared to the current depth value for that pixel. Since the depth buffer is set to all the closest depth values (small values) but is discriminating on the farthest depth values (large values) the back facing triangles will be rendered.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.