Graphics Reference
In-Depth Information
SAFE_RELEASE( pDebugger );
SAFE_RELEASE( pDevice );
Listing 1.14. Releasing the various interfaces that have been used in the simple example application.
If there are still some references that have not been properly released, a debug mes-
sage will be printed to the debug console, indicating which interface object types still have
outstanding references that haven't been released. If all references were properly released,
the application will exit, just like any other application.
1.5.3 Further Application Considerations
While the example steps that we walked through in the second half of this chapter are
indeed important to understand, they are not the most exciting operations to perform for
every application that you create. Many of these tasks, such as creating a window or ini-
tializing the device, can be handled with library functions that can be reused for all of the
applications that you create. In the real-time rendering context, this type of a library is often
called an engine, a term first coined by John Carmack of id Software.
This is the path that we have chosen to follow for the sample programs in this
topic. All of the samples are built upon an open source engine developed by the authors,
called Hieroglyph 3. The engine and the samples are both freely downloadable from the
Hieroglyph 3 project page, which can be found at http://hieroglyph3.codeplex.com . In ad-
dition to the samples from this topic, many other example applications are included in the
source code repository for learning the basics of the library.
By using such an open source library, we can devote more of this topic to the con-
cepts and use of Direct3D 11, rather than spending time explaining basic Win32 application
code or giving repetitive code samples. The library takes care of the basics, so that we can
focus on the more interesting portions of the subject matter and ultimately provide a better
topic. The Hieroglyph 3 library is provided with the MIT license, which includes a liberal
set of usage guidelines, and that you can use as the basis of your own projects.
Search WWH ::




Custom Search