Game Development Reference
If builders built buildings the way programmers wrote programs, then the
first woodpecker that came along would destroy civilization.
Weinberg's Second Law
The number of art assets used in the majority of games today can be anywhere
from thousands to hundreds of thousands. These assets can be used in numerous
places throughout a variety of in-game environments, and typically, the level
designers are in charge of determining which assets go where. Some game studios
build their own level editors that can manipulate world geometry and handle the
placement and scripting of entities. These editors typically offer the ability to select
an arbitrary mesh or primitive and assign a texture asset to the geometry. When
you have thousands of textures available, designers are more productive if the edi-
tor is able to display a thumbnail preview of the different textures available for an
environment instead of a textual listing. It is much more appealing to scroll
through a collection of texture thumbnails than to scroll through a listing of file-
names that might not even describe the contents in an adequate fashion. Texture
browsing has its place in a variety of tools, but the most common place to offer it
is within a world editor.
This chapter is geared toward building a control that offers texture or image
browsing from both local image files and Managed Direct3D Texture resources.