Game Development Reference
In-Depth Information
to use a software renderer. On the other hand, if a device does have a GPU, a hardware
renderer could be used, all the while keeping the drawing pipeline intact. With that in mind,
video handling can be classified in three groups, as described in the following sections.
Pure Software Renderer
A pure software renderer is good for low-end devices with poor quality or no GPUs. This
renderer is typical on simple games that don't require a lot of horsepower. The Wolfenstein
3D in Chapter 5 in this topic has used a software renderer. The process is simple; at the end
of every interaction of the game loop, an image buffer is drawn with all the sprites for that
state in the game. The image buffer is then sent to the Android activity, which renders it in a
specific view (see Figure 2-16 ).
Figure 2-16. Pure software renderer
The drawback of this technique is that it is the slowest and can consume the most memory
and CPU power of the three.
Mixed or Hybrid Renderer
In a mixed renderer, the drawing of the sprites is performed in software, but the actual
rendering is performed in hardware (typically by using OpenGL ES). Figure 2-17 shows the
component interactions of this technique. The benefits? It is faster than the previous one (by
orders of magnitude). The caveats? It requires a GPU to implement an OpenGL ES renderer.
 
Search WWH ::




Custom Search