Game Development Reference
Building the application layer
Now we can begin to build an application layer. The purpose of this layer is to sep-
arate essential communication with the Windows operating system from our custom
application logic. This allows our future demo applications to be more focused, and
keep our codebase clean and re-usable.
Continue from here using the Chapter1.2_TheApplicationLayer project
Handling low-level operating system commands, particularly for a graphical applica-
tion, can be a tedious and painful task, but the FreeGLUT library was created to help
people like us to create OpenGL-based applications and avoid such burdens. The
trade-off is that when we launch our application, we effectively hand the majority of
control over to the FreeGLUT library.
We can still control our application, but only through a series of callback functions.
Each callback has a unique purpose, so that one might be used when its time to
render the scene, and another is used when keyboard input is detected. This is a
common design for utility toolkits such as FreeGLUT. We will be keeping all of our ap-
plication layer code within a single class called BulletOpenGLApplication .
Downloading the example code
You can download the example code files for all Packt topics you have purchased
from your account at http://www.packtpub.com . If you purchased this topic else-
where, you can visit http://www.packtpub.com/support and register to have the
files e-mailed directly to you.