Chapter     5

Writing a Renderer

One of the key tasks carried out by a game engine is to feed geometry data to the graphics processing unit (GPU). A GPU is a highly specialized piece of hardware which operates on streams of data in parallel. This parallelization of processing is what makes GPUs essential in modern real-time graphics applications and is the reason why they were dubbed hardware accelerators.

A renderer’s job is to feed the geometry to the GPU as efficiently as possible. In a game engine there will be a distinct split between processing the game updates, that is, moving game objects, AI, physics, etc., and rendering the scene.

It is entirely possible to write a software renderer which operates on the CPU, but this would be a futile ...

Get Beginning Android C++ Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.