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

Exercises

As your first exercise, rotate your viewpoint slowly around the table by adding one single method call to onDrawFrame.

For a more challenging exercise, take a look at the following figure:

images/Objects/public-domain-air-hockey-table-with-mallet.jpg

How would you update the mallet generator to more closely approximate this type of mallet? You can still build the mallet out of simple geometric shapes. Here’s one way you might want to approach it:

  • Two regular cylinder sides: one for the handle, one for the outside of the base

  • Two rings: one for the top of the base and one for the inside of the base

  • One sloped cylinder side for the inside of the base to connect the two rings

  • A half-sphere to cap the ...

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