Game Development Reference
In-Depth Information
chapter 2
Introducing
OpenGL
Every computer has special graphics hardware that controls what you see on the
screen. OpenGL tells this hardware what to do. Figure 2.1 shows how OpenGL is
used by a computer game, or any other piece of software, to issue commands to
the graphics hardware using the device drivers supplied by the manufacturer.
The Open Graphics Library is one of the oldest, most popular graphics libraries
game creators have. It was developed in 1992 by Silicon Graphics Inc. (SGI) but
only really got interesting for game players when it was used for GLQuake in
1997. The GameCube, Wii, PlayStation 3, and the iPhone all base their graphics
libraries on OpenGL.
The alternative to OpenGL is Microsoft's DirectX. DirectX encompasses a larger
number of libraries, including sound and input. It is more accurate to compare
OpenGL to the Direct3D library in DirectX. The latest version of DirectX is
DirectX 11. The Xbox 360 uses a version of DirectX 9.0. DirectX 10 and 11 will
only work on computers with the Windows Vista or Windows 7 operating sys-
tems installed.
The feature sets of Direct3D and OpenGL are pretty much equivalent. Modern
game engines—for example, Unreal—usually build in a layer of abstraction that
allows the user to switch between OpenGL and Direct3D as they desire, as shown
in Figure 2.2. This abstraction is required when producing multiplatform games
that will be released for both the PlayStation 3 and Xbox 360. The Xbox 360 must
use Direct3D calls, whereas the PS3 uses OpenGL calls.
 
 
Search WWH ::




Custom Search