Graphics Reference
In-Depth Information
In computer graphics, the drawing procedure from Steps 1 to 4 is referred to as
the rendering process. The use of an internal drawing buffer to hide the drawing
process from the user is referred to as double buffering. We refer to the collection
Double buffering. Dedicate
two hardware render buffers
to isolate the drawing process
from the user. In this way,
the users will never see partial
drawing results on the applica-
tion window.
of parameters that affects the appearance of rendered results as the scene. In
this case, our scene is defined in Step 3, consisting of the geometries of the two
squares. Although with many unknowns, we see that the rendering procedure of
the D3D API is quite comprehensible! To ensure more thorough understanding,
we will continue to examine GrfxWndD3D.cpp and CGrfxWndD3D::OnPaint()
in the next few chapters.
3.3
Lessons Learned
After the detailed analysis of Tutorial 3.1, we can only claim partial understand-
ing! This may seem overwhelming; however, at this point we have verified the
following.
Computer graphics draws geometry. Just like drafting technical draw-
ings in real life, proper design and planning is essential when programming
computer graphics. We have careful measurements and a design prior to
actual programming.
Choice of coordinate system is important. In the world of computer
graphics, as the programmer, we choose the coordinate system that defines
the space in the world. We have observed the importance of a convenient
coordinate system. For Tutorial 3.1, if we had chosen the origin to be lo-
cated at the center of the small square and inches to be the unit of measure-
ment in Figure 3.2, then our solution in Listing 3.3 will become ( 1 inch =
2.54 cm)
25
2
25
2
V a =(
54 ,−
54 ,
0
) ,
.
.
105
2
105
2
V b =(
54 ,−
54 ,
0
) .
.
.
Notice that different choices for coordinate systems will result in identical
images being rendered. The choice we implemented did not result in a more
correct solution, but it allowed for a simpler and more elegant solution.
More significantly, our current knowledge allows us to do the following.
Appreciate the distinctions between concepts and technologies. For ex-
ample, Tutorial 3.1 is an implementation based on a specific API technol-
ogy. In the next section (Tutorial 3.2), we will examine another implemen-
Search WWH ::




Custom Search