Book Image

OpenGL ES 3.0 Cookbook

By : Parminder Singh
Book Image

OpenGL ES 3.0 Cookbook

By: Parminder Singh

Overview of this book

<p>"Write once, use anywhere" is truly the power behind OpenGL ES and has made it an embedded industry standard. The library provides cutting-edge, easy-to-use features to build a wide range of applications in the gaming, simulation, augmented-reality, image-processing, and geospatial domains.</p> <p>The book starts by providing you with all the necessary OpenGL ES 3.0 setup guidelines on iOS and Android platforms. You'll go on to master the fundamentals of modern 3D graphics, such as drawing APIs, transformations, buffer objects, the model-view-project analogy, and much more. The book goes on to deal with advanced topics and offers a wide range of recipes on the light shading, real-time rendering techniques with static and procedure textures to create stunning visualizations and runtime effects.</p>
Table of Contents (21 chapters)
OpenGL ES 3.0 Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Software requirements for OpenGL ES 3.0 – iOS


The specifications of OpenGL ES 3.0 are fully supported by iOS 7 and later versions. iPhone 5s, along with Apple's A7 GPU supports OpenGL ES 3.0 and the earlier version of OpenGL ES 2.0 and 1.1. Apple A7 GPU, provides the accessibility of all new features of OpenGL ES 3.0. It also has a larger pool of rendering resources. The shaders capability in 3.0 to access texture resource is twice as compared to OpenGL ES 2.0.

Getting ready

MAC provides the Xcode IDE for development of iOS applications, which targets iPhone, iPad, and iPod. The minimum requirements to support OpenGL ES 3.0 is version 5.0; all versions of Xcode beyond 5.0 supports iOS 7 build targets. This book will use the Xcode 5.2 version for its sample recipes.

How to do it...

OpenGL ES 3.0 is supported by the iOS 7 SDK on Xcode 5.0 and higher versions. The Xcode 5.0 version contains the iOS 7 SDK. If you are a new user, you can install it using your App store application. If you are using an older version of Xcode, you must update it to at least 5.0. The iOS 7 SDK and higher versions support OpenGL ES 3.0 through iOS 7 target devices.

How it works...

OpenGL ES 3.0 on the iOS7 with powerful GPU can perform sophisticated graphics rendering. The GPU is capable of high complex calculations in shaders for every pixel on the screen. OpenGL ES 3.0 is a C-based API seamlessly integrated into Object or C/C++. The OpenGL ES specification does not define the Windowing layer because the windowing mechanisms for all operating systems are very different from each other. Therefore, the underlying operating system is responsible for generating the rendering context to provide the windowing layer. In addition to this, the operating system must also provide a presentation layer where OpenGL ES can be rendered. iOS provides GLKit, which gives the presentation layer by providing the draw surface. GLKit was introduced in iOS 5 for the development of OpenGL ES. This is a 3D graphics development kit for OpenGL ES 2.0/3.0 using objective C/C++. This kit makes the programming job easier for the programmable pipeline architecture. For more information, refer to the Apple developer site at https://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKit_Collection/index.html.

There's more...

GLKit is developed using the C/C++ objective language. This language is only supported in Mac and iOS-based applications. Therefore, if we want our code to be portable across platforms, we need to program it in C/C++. The Objective C language supports the C/C++ language seamlessly within its framework.

The game engines, which work beautifully across platforms, actually use their own platform-independent frameworks for OpenGL ES programming. These frameworks are similar to GLKit, or even more powerful. In our approach, we will develop our own engine from scratch in C/C++ in order to build an acceptable cross-platform 3D graphics framework for Android and iOS.

See also

Apple provides special references to develop OpenGL ES applications on iOS. These references cover various aspects of OpenGL ES with respect to iOS. For more information, visit https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/Introduction/Introduction.html.