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

Making the Data Accessible to OpenGL

We’ve finished defining our vertices, but we need to do an extra step before OpenGL can access them. The main problem is that the environment where our code runs and the environment where OpenGL runs don’t speak the same language. There are two main concepts that we need to understand:

  1. When we compile and run our Java code in the emulator or on a device, it doesn’t run directly on the hardware. Instead, it runs through a special environment known as the Dalvik virtual machine. Code running in this virtual machine has no direct access to the native environment other than via special APIs.

  2. The Dalvik virtual machine also uses garbage collection. This means that when the virtual machine detects that a variable, ...

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