O'Reilly logo

OpenGL ES 2 for Android by Kevin Brothaler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2Defining Vertices and Shaders

This chapter introduces our first project: a simple game of air hockey. As we work on this project, we’ll learn about some of the major building blocks of OpenGL along the way.

We’re going to start off by learning how to build objects by using a set of independent points known as vertices, and then we’re going to learn how to draw these objects by using shaders, small programs that tell OpenGL how to draw an object. These two concepts are extremely important because just about every object is built by joining together vertices into points, lines, and triangles, and these primitives all get drawn by using shaders.

We’ll first learn about vertices so that we can build up our air hockey table and position ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required