Graphics Reference
In-Depth Information
Direct3D 1 (on Windows platforms for desktop/laptop, smartphone, and gaming
hardware such as Xbox 360) and the open source cross-platform OpenGL.
The goal of these low-level platforms is to provide access to the graphics hard-
ware functions in a hardware-independent manner with minimal resource cost;
they are thin layers above the graphics hardware device drivers. A key character-
istic is that they do not retain the scene; instead, the application must respecify
the scene to the platform in order to perform any update of the display. These
immediate-mode (IM) platforms thus act as conduits to the graphics hardware,
translating a device-independent stream of graphics instructions and data into the
proprietary instruction set of the underlying GPU.
You as a developer have the choice of directly using a low-level IM API—
which places the application close to the hardware, allowing maximum control—
or using a retained-mode (RM) middleware platform (such as WPF) that offers
the convenient abstraction of a scene graph. RM platforms—described in greater
detail in Section 16.4.2—create opportunities for automated performance opti-
mization, and simplify many development tasks by making it easier to express
complex constructions. However, when you use an RM platform, you lose the
potential for peak performance and may experience delays in access to the latest
hardware features when waiting for the next release of the middleware. It is usu-
ally a good idea to work at the highest level practical for your application, and use
a limited amount of lower-level code for performance-critical features.
It is important to note that the architecture of graphics hardware is in flux,
as GPUs become more powerful and more general-purpose. The GPU is rapidly
morphing into what might be called a Highly Parallel Processing Unit, which has
already brought ray tracing onto commodity graphics hardware and into the realm
of real-time rendering. Keep in mind that our focus here is on platforms built using
current GPU polygon-rendering architectures.
16.1.1 Evolution from Fixed-Function to Programmable
Rendering Pipeline
Graphics hardware and IM APIs have been co-evolving for several decades, each
influencing the other. New features on the hardware side have, of course, required
API enhancements for access. Simultaneously, developer identification of bottle-
necks and limitations in the IM layer and the underlying hardware produces feed-
back that leads to innovations in graphics hardware. The co-evolution has, over
time, caused a major paradigm shift in the IM layer's functionality, as exhibited
in Figure 16.1, whose focus is on the evolution of the two most pervasive IM
platforms on commodity hardware.
16.1.1.1 The Fixed-Function Era
Commodity graphics acceleration hardware in the early/mid-1990s implemented
fixed-function (FF) pipelines (similar to WPF's) using industry-standard non-
global lighting and shading models (Phong or Blinn-Phong lighting, Gouraud or
Phong shading), and depth-buffer visible surface determination as described in
1. Direct3D is the 3D graphics portion of the umbrella suite of multimedia APIs that
is known as DirectX. Note that some 3D-related publications will use the two names
interchangeably, but the proper way to refer to the 3D functionality is to use the term
“Direct3D” or the abbreviation “D3D.”
 
 
Search WWH ::




Custom Search