Normal quotes
This commit is contained in:
parent
5e10794a24
commit
18011c595a
352 changed files with 6040 additions and 6040 deletions
14
67-04.md
14
67-04.md
|
|
@ -3,7 +3,7 @@
|
|||
------------------------ --------------------------------- --------------------
|
||||
|
||||
By the same token, Listing 67.1 is quite a bit more complicated than the
|
||||
earlier code. The earlier code’s HSR consisted of a z-sort of objects,
|
||||
earlier code. The earlier code's HSR consisted of a z-sort of objects,
|
||||
followed by the drawing of the objects in back-to-front order, one
|
||||
polygon at a time. Apart from the simple object sorter, all that was
|
||||
needed was backface culling and a polygon rasterizer.
|
||||
|
|
@ -13,16 +13,16 @@ process. After backface culling, the edges of each of the polygons in
|
|||
the scene are added to the global edge list, by way of
|
||||
**AddPolygonEdges()**. After all edges have been added, the edges are
|
||||
turned into spans by **ScanEdges()**, with each pixel on the screen
|
||||
being covered by one and only one span (that is, there’s no overdraw).
|
||||
Once all the spans have been generated, they’re drawn by
|
||||
being covered by one and only one span (that is, there's no overdraw).
|
||||
Once all the spans have been generated, they're drawn by
|
||||
**DrawSpans()**, and rasterization is complete.
|
||||
|
||||
There’s nothing tricky about **AddPolygonEdges()**, and **DrawSpans()**,
|
||||
There's nothing tricky about **AddPolygonEdges()**, and **DrawSpans()**,
|
||||
as implemented in Listing 67.1, is very straightforward as well. In an
|
||||
implementation that supported texture mapping, however, all the spans
|
||||
wouldn’t be put on one global span list and drawn at once, as is done in
|
||||
wouldn't be put on one global span list and drawn at once, as is done in
|
||||
Listing 67.1, because that would result in drawing spans from all the
|
||||
surfaces in no particular order. (A surface is a drawing object that’s
|
||||
surfaces in no particular order. (A surface is a drawing object that's
|
||||
originally described by a polygon, but in **ScanEdges()** there is no
|
||||
polygon in the classic sense of a set of vertices bounding an area, but
|
||||
rather just a set of edges and a surface that describes how to draw the
|
||||
|
|
@ -81,7 +81,7 @@ leading edge causes its surface to be 1/z-sorted into the surface stack,
|
|||
with a span emitted if necessary. Each trailing edge causes its surface
|
||||
to be removed from the surface stack, again with a span emitted if
|
||||
necessary. As you can see from Listing 67.1, it takes a fair bit of code
|
||||
to implement this, but all that’s really going on is a surface stack
|
||||
to implement this, but all that's really going on is a surface stack
|
||||
driven by edge events.
|
||||
|
||||
------------------------ --------------------------------- --------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue