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

Simulating the particle system


In computer graphics, the simulating particle system is a simulation of the natural phenomena, such as dust, smoke, rain, fireworks, and so on. This particle system contains large number of tiny particles, which can vary from few hundreds to millions in numbers. Each of the unit particles possess the same characteristics, such as velocity, color, lifespan, and so on. These particles are updated once every frame. During the update, the respective characteristics of particles are computed and updated. As a result, it makes them move or appear to change its color.

In this recipe, we will implement the particle systems. Each particle is made up of a quad and textured with translucent texture. Each particle possesses a specific color that changes with the update of time. Let's take an overview of this recipe to understand the implementation of the simulation of the particle system:

  • Define particle attributes: This creates the data structure, which contains the important...