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

Creating Our First Program

Now that we have our tools installed and configured, let’s go ahead and create our first OpenGL program. This program will be very simple: all it will do is initialize OpenGL and clear the screen continuously. That’s the minimum we need to have an OpenGL program that actually does something.

If you want to follow along in the code, all of the source code and accompanying data for this book can be downloaded from this book’s home page.[19]

Joe asks:
Joe asks:
Why Do We Need to Continually Clear the Screen?

Clearing the screen seems wasteful if we’re already drawing over the entire screen on each frame, so why do we need to do it? ...

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