In computer graphics programming, a render target is an area of computer memory in which the next frame to be displayed is drawn. Most often used to increase rendering speed, the render target usually is in an area of dedicated memory on the graphics card near the graphics processing unit (GPU). Although the concept is nearly the same, there are some minor differences in the implementation and naming conventions connected with a render target; these depend on the programming language or library being used, with some languages calling it a back buffer, a framebuffer object or a double buffer. It also is possible, especially in three-dimensional (3D) computer graphics, to use the render target to draw textures onto objects to help optimize the final display image when it is compiled. In some instances it is possible to have multiple render targets (MRTs), with different parts of a frame being drawn on different surfaces and then composited onto the final target.
The idea of a render target is similar to the process used with double buffering. An image essentially is drawn onto an off-screen surface, which is really an area of memory, so that when it is time for the next frame to be drawn to a display device or screen, it can be done as quickly as possible because all of the drawing functions have already been performed. The difference with a render target in many implementations is that the area of memory used can be on the graphics card and managed through hardware or other aspects of the GPU, making it far more efficient and faster than a software-managed double-buffering design.
In the case of 3D computer graphics programming, a render target can be used to optimize the rendering of objects that use images for their surface textures. The render context is inside the graphics hardware, so this can allow for very fast rasterization of 3D objects. Special effects also can be drawn in this way, making the assembly of the final scene on a back buffer very fast because most of the graphical information is being moved only a short distance on the graphics card.
The graphics hardware, drivers and libraries that are being used can make some difference in how a render target operates. One specific constraint is with the use of MRTs, in which the graphics card determines how many targets can be used simultaneously. Some cards also do not have any hardware support for render targets at all, although similar functionality can usually be achieved through alternative means.