Game Development Reference
This chapter covered what a swap chain is, how to create them, applicability with
MDI applications, and how to effectively create and manage swap chains within
an MDI application.
Overall, the solution presented in this chapter is very flexible and extensible, although
there are a couple of areas that could be refactored to improve performance or
promote more reusability. For example, the device and swap chain creation could
be routed through a virtual function that allows the user to specify settings and
parameters on a per override basis. On another note, earlier it was mentioned that
swap chains increase the number of render state changes, so it would be advanta-
geous to implement a batching mechanism to reduce the total number of changes
The Companion Web site contains the full source code for the manager presented
in this chapter, including a demo application that uses it within an MDI applica-
tion in a variety of ways.