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

Pitfalls to Watch Out For

Sometimes the problem isn’t obvious: glGetError doesn’t return anything unusual, and the traces appear fine. Other times, the app might blow up with a segmentation fault at an unexpected place, robbing us of the chance to put in a breakpoint and figure out what’s going on. When these problems occur, we have to fall back to standard debugging techniques and narrow things down until we find the problem.[94]

One of the easiest methods to get wrong is glVertexAttribPointer (see Associating an Array of Vertex Data with an Attribute for a refresher), and getting it wrong will often lead to strange display issues and segmentation faults. As an example, let’s say that we have a vertex array for an object with a position attribute, ...

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