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

Grouping uniforms and creating buffer objects


The interface block helps in grouping the uniform variables into one logical bunch. This is very useful in grouping the related variables in the shader programing. The interface block gives an opportunity to share the uniform data among multiple programs at once. This allows us to set multiple uniform variables in one go, which can be used many times.

A Uniform Buffer Object (UBO) is a buffer object for the interface blocks (containing uniform) similar to VBO, IBO, and so on. It stores the contents of the interface block in the GPU memory for quick data access at runtime. The UBO uses bind points that act as a mediator between the uniform block and uniform buffer. In this recipe, we will create a uniform block and learn how to program uniform buffer objects.

This recipe demonstrates the concept of interface block. In this recipe, we created an interface block to store transformation matrices. This block contain three uniforms. The interface block...