Fix crash when forgot to call glVertexAttribPointer

Calling glDraw* will crash the emulatorif one forgot to call
glVertexAttribPointer first. This patch fixes it.

There are two situations: (1) user forgot to enable any vertex
attribute arrays, or (2) user enabled a vertex attribute array but
forgot to bind any data to it. This patch fix both situations. After the
patch, in (1) user will get an error message, in (2) user will get an
error message as well as GL error code GL_INVALID_OPERATION. These are
similar behaviors as running it in swift shader or on a real device.

(Running it on a real device with (1) will give nothing and with (2)
will crash the app.)

Change-Id: Id045c0c81a489a7c6ee4b6efc91f5ab148432f35
2 files changed
tree: 713f6650d79eff116438d96ed413b89ac5633851
  1. host/
  2. shared/
  3. system/
  4. tests/
  5. Android.mk
  6. common.mk
  7. README