1. Field of the Invention
The present invention is directed to computer systems. More particularly, it is directed to graphical image processing.
2. Description of the Related Art
Traditionally, rendering a complex image, such as one requiring the rendering of multiple sub-images, on a graphic processing unit (GPU) required switching between multiple frame buffers. Additionally, texture maps have generally been used to store textures that are two-dimensional representations of three-dimensional models to be applied to various surfaces when rendering a three-dimensional scene. For example, a texture atlas may include all of the individual graphic elements rendered in a flat two-dimensional fashion that would then be applied to a three-dimensional geometry.
When utilizing graphics hardware, such as a GPU, graphics or pixels, sometimes called fragments, can generally only be rendered to individual frame buffers. Additionally, combining particular foreground graphics with the background, such as when rendering a partially transparent graphic object, traditionally involves rendering the background image to one frame buffer, allocating a second frame buffer, performing a context switch to the second frame buffer, rendering the foreground image to the second frame buffer, performing another context switch back to the original frame buffer, and then copying (and possibly blending or combining) the foreground image onto the background image in the original frame buffer to result in the correct overall image.
Furthermore, performing a context switch on a GPU is typically a very expensive operation, such as in terms of execution time. Given that many graphic-intensive applications may include many (even thousands of) individual graphic objects requiring rendering, performing multiple context switches to render a single overall may cause significant performance issues, such as increasing the overall execution time.
Texture mapping may be considered a method of adding detail, surface texture, or color, to a computer-generated graphic or 3D model. Frequently, a texture is applied (i.e. mapped) to the surface of a shape. A texture map or texture atlas is a particular type of memory allocation used within graphics hardware. The texture atlas includes multiple textures that may be individually accessed from within the texture atlas and mapped onto the surface of graphics objects being rendered. Generally, the texture information stored in a texture atlas is static within the texture atlas. In other words, the texture information is loaded once, such as at program initialization, and is only read subsequently. For example, a graphic intensive video game may load a set of two-dimensional graphic representations of various graphic elements into texture atlas from which they will be read from throughout the game. Frequently, the entire set of textures may be loaded as a single block directly into a texture map. For example, two-dimension representations of individual features in a game, such as game pieces, people, outfits, objects, etc. may be loaded into a texture atlas at the start of the game and used throughout the game to render those elements.