Game Engine Architecture

(Ben Green) #1

36 1. Introduction


Low-Level Renderer

Primitive
Submission

Viewports &
Virtual Screens

Materials &
Shaders
Texture and
Surface Mgmt.

Graphics Device Interface

Static & Dynamic
Lighting Cameras Text & Fonts
Debug Drawing
(Lines etc.)

Skeletal Mesh
Rendering

Figure 1.19. Low-level rendering engine.

Resources (Game Assets)

Resource Manager

3D Model Resource ResourceTexture ResourceMaterial ResourceFont ResourceSkeleton ResourceCollision ParametersPhysics World/MapGame etc.

Figure 1.18. Resource manager.

1.6.8. Rendering Engine
The rendering engine is one of the largest and most complex components of
any game engine. Renderers can be architected in many diff erent ways. There
is no one accepted way to do it, although as we’ll see, most modern rendering
engines share some fundamental design philosophies, driven in large part by
the design of the 3D graphics hardware upon which they depend.
One common and eff ective approach to rendering engine design is to em-
ploy a layered architecture as follows.

1.6.8.1. Low-Level Renderer
The low-level renderer , shown in Figure 1.19, encompasses all of the raw ren-
dering facilities of the engine. At this level, the design is focused on rendering
a collection of geometric primitives as quickly and richly as possible, without
much regard for which portions of a scene may be visible. This component is
broken into various subcomponents, which are discussed below.

Graphics Device Interface
Graphics SDKs, such as DirectX and OpenGL, require a reasonable amount of
code to be writt en just to enumerate the available graphics devices, initialize
them, set up render surfaces (back-buff er, stencil buff er etc.), and so on. This
Free download pdf