Game and Graphics Programming for iOS and Android with OpenGL ES 2.0
eBook - ePub

Game and Graphics Programming for iOS and Android with OpenGL ES 2.0

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Game and Graphics Programming for iOS and Android with OpenGL ES 2.0

About this book

Develop graphically sophisticated apps and games today!

The smart phone app market is progressively growing, and there is new market gap to fill that requires more graphically sophisticated applications and games. Game and Graphics Programming for iOS and Android with OpenGL ES 2.0 quickly gets you up to speed on understanding how powerful OpenGL ES 2.0 technology is in creating apps and games for amusement and effectiveness. Leading you through the development of a real-world mobile app with live code, this text lets you work with all the best features and tools that Open GL ES 2.0 has to offer.

  • Provides a project template for iOS and Android platforms
  • Delves into OpenGL features including drawing canvas, geometry, lighting effects, character animation, and more
  • Offers explanation of full-function 2D and 3D graphics on embedded systems
  • Addresses the principal technology for hardware-accelerated graphical rendering

Game and Graphics Programming for iOS and Android with OpenGL ES 2.0 offers important, need-to-know information if you're interested in striking a perfect balance between aesthetics and functionality in apps.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Game and Graphics Programming for iOS and Android with OpenGL ES 2.0 by Romain Marucchi-Foino in PDF and/or ePUB format, as well as other popular books in Computer Science & Software Development. We have over one million books available in our catalogue for you to explore.

Information

Publisher
Wrox
Year
2012
Print ISBN
9781119975915
eBook ISBN
9781119976271
Chapter 1
Getting Started
WHAT’S IN THIS CHAPTER?
  • Learning about the software used in this book
  • Downloading the book’s SDK
  • Understanding the SDK architecture
  • Importing projects into your IDE
  • Understanding this book’s template application
  • Learning how to work with the template code structure
In this chapter, you will first start by setting up your development environment to be able to work with this book’s tutorials and examples.
You will then receive a quick introduction about this book’s SDK and where to download it, and learn about the different directories it contains. Then you will learn how to import this book’s existing SDK projects and templates into your favorite IDE, as you will do throughout this book when following the different tutorials.
Moving on to the last section of this chapter, you will learn about this book’s cross-platform template project. And finally, this chapter concludes with a quick tutorial that will help you to get familiar with the events of the template, as well as with the tone that will be used for all the tutorials in this book.
SOFTWARE REQUIREMENTS
This book’s content is built to run on iOS 5.x+ as well as for Android 2.x+, the latest and most stable versions of these two mobile operating systems at the time this book was written.
For iOS Developers
To use this book for iOS, all you have to do is to grab a copy of the latest iOS SDK available at http://developer.apple.com, and install it on your Mac.
Out-of-the-box the iOS SDK provides a simulator with full GLES v2 support, so even if you do not have an iOS device, or do not have an official iOS Developer Certification from Apple, you can still make full use of this book.
For Android Developers
To set up your environment for Android, it is unfortunately not as easy as for iOS. First go to http://developer.android.com/sdk/installing.html and follow the instructions to install the Android SDK, Eclipse, and the ADT plug-in. Please note that the Android SDK version used for this book was v2.3.4, but later versions should also work as well.
All the code in this book uses C/C++, which means that you will have to install Android Native Code support. To finalize the installation of your development environment, follow these steps:
1. Grab a copy of the Android NDK at the following address: http://developer.android.com/sdk/ndk/index.html. The version used at the time of writing this book was r5c, but all examples and tutorials should work on later versions as well. Download the Android NDK zip package and decompress it on your machine where you have read and write access.
2. In order to compile and debug native code using Eclipse, you will need to install the Sequoyah plug-in. To do this, first enable the repository that is located (from the Eclipse main menu) in: Help ⇒ Install New Software ⇒ Available Software Sites ⇒ Sequoyah Metadata Repository. Then select the entry from the Work With combo box, and once the repository data is loaded, select and install the Sequoyah Android Native Code Support, as shown in Figure 1-1.
FIGURE 1-1: Sequoyah Native Code Support plug-in
image
3. Once Sequoyah is installed, go to (from the main menu): Eclipse Preferences ⇒ Android ⇒ Native Development and specify the location where you extracted the Android NDK in step 1, as shown in Figure 1-2.
FIGURE 1-2: Specify the location of the Android NDK
image
Congratulations — your Android development environment is now all set! However, please note that in order to use this book with Android you will need an actual device with OpenGL ES 2.0 support. The emulator provided by the Android SDK supports only OpenGL ES 1.x, not OpenGL ES 2.0. So local deployment on the simulator is not possible on Android; only device deployment is supported when using GLES 2.
DOWNLOADING THE BOOK’S SDK
image
Once your development environment is set up, you should now grab a copy of this book’s SDK. The official SDK is available for download at http://www.wrox.com. Alternatively, if you wish to download it through GIT, go to the official GFX 3D engine website, http://gfx.sio2interactive.com, where you can find detailed instructions.
If you have downloaded the zip file, simply decompress it in a directory that you have read and write access to. If you have downloaded it using GIT, all the files and the SDK architecture are already available on your drive.
The architecture of this book’s SDK is very simple. For more information, please refer to the following directory list:
  • _chapter#-#: Contains the final result that you should reproduce by reading the tutorials in the book. At any time while reading this book, if you feel that the instructions are not clear, or if you are unsure where to insert some code, or even if you simply want to preview the final result of a tutorial, open this directory. Inside the directory, you can then find at the root the source files used by the tutorial (respectively named templateApp.cpp and templateApp.h) and two directories that contain the project files for iOS and Android. You can then load the project into your IDE and rebuild it from scratch.
  • common: Contains the free and open source GFX 3D engine (the mini game and graphics engine that you will be using in this book) source code of the version that was used to create the templates and tutorials for this book, along with the source of the libraries the engine depends on. The GFX 3D engine is a very small and lightweight graphic engine that is built with bits and pieces of my own professional engine. It is very small, fast, flexible, and scalable; and will allow you to render state-of-the-art graphics on your mobile device, as shown in Figure 1-3.
    FIGURE 1-3: An FPS demo using the GFX 3D engine
    Models and textures are generously provided by David Radford (http://dmradford.com).
    image
  • data: In this directory, you can find all the original assets that were used in each tutorial. These assets are either linked dynamically to the projects (in the case of iOS) or simply duplicated inside the assets directory of each Android tutorial. Please note that all the original project 3D scenes are available as .blend (the default file extension of Blender). It is not mandatory, but highly suggested that you download a copy of Blender for your platform, which is available at http://blender.org. This will enable you to study the way the scenes are built and how the assets are linked and exported to the Wavefront OBJ (the official 3D model exchange format used in the book).
  • EULA: In here, you can find all the End User License Agreements for the different libraries that this book’s SDK relies on. If you plan to release a commercial application using this book’s SDK, make sure that your application complies with all of these licenses.
  • glsloptimizerCL: Contains the source to a simple yet powerful command line program that you can use to optimiz...

Table of contents

  1. Cover
  2. Contents
  3. Chapter 1: Getting Started
  4. Chapter 2: Setting Up Your Graphic Projections
  5. Chapter 3: Dealing with Complex Geometry
  6. Chapter 4: Building a Scene
  7. Chapter 5: Optimization
  8. Chapter 6: Real-Time Physics
  9. Chapter 7: Camera
  10. Chapter 8: Pathfinding
  11. Chapter 9: Audio and Other Cool Game Programming Stuff
  12. Chapter 10: Advanced Lighting
  13. Chapter 11: Advanced FX
  14. Chapter 12: Skeletal Animation
  15. Introduction
  16. Advertisements