Game Development Reference
In-Depth Information
The GL_QUADS , GL_QUAD_STRIP , and GL_POLYGON primitives are not supported.
These are some of the things to watch for when you decide to port your OpenGL game to an
embedded device.
The Veil Has Been Lifted
The veil has been lifted to reveal a new frontier of 3D development for Android. The techniques
demonstrated in this chapter can help you to bring a large number of 3D PC games to the platform, at an
enormous savings in development costs.
In this chapter, you have learned a trick to mix OpenGL code in Java and C to enable the reuse of
large portions of C code along with Java code. We started by looking at the OpenGL tumbling cubes
sample provided by Google, and how sections of the rendering process can be implemented in C. You
saw that the sample's rendering process included EGL initialization, the main loop, drawing, buffer
swap, and cleanup. Then you saw how to reimplement the cube rendering invoked within the main
loop. You created the new components:
The native activity used to launch the application from the device
The native interface class used to define the native methods and C callbacks
The cube renderer and cube class used to render the cubes
Finally, we looked at the limitations of OpenGL ES when it comes to advanced 3D games.
I hope this chapter will help you get your own 3D games for Android with minimal effort and maximum
code reuse. This is a prelude to the next chapters, where we will look at two of the greatest 3D shooters
for the PC, Wolfenstein 3D and Doom, and the minimal changes required to get them running on your
phone.
Search WWH ::




Custom Search