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

Implementing reflection and refraction with environment mapping


Environment mapping is a simple yet effective and efficient technique that allows you to map the surrounding environment effect to render 3D objects. There are two ways in which environment mapping can be used: reflection and refraction. In the former technique, rendered objects are mapped with the reflection of the surroundings, which shows the reflection of the surrounding view of objects. However, in the latter case, objects mapped with the refraction allow you to see through objects. These environment mapping techniques require cube mapping that we programmed in the previous recipe Skybox with seamless cube mapping. In this recipe, we will implement the reflection and refraction environment mapping.

Getting ready

For this recipe, we can reuse the Implementing Skybox with seamless cube mapping recipe and Rendering the wavefront OBJ mesh model recipes in Chapter 5, Working with Meshes. The former recipe does not require any...