Warning: glDeleteTextures broken on Qualcomm drivers

There are few things worse than broken library implementations, so I thought I’d post a warning for others.

Qualcomm’s (present in most android devices) implementation of glDeleteTextures raises GL_INVALID_VALUE if you try to delete zero textures, in violation of the specification.

ಠ_ಠ

Annoying yes, but then why would you do that anyway? ::slight_smile:

Cas :slight_smile:

Yeah, happily it’s easy to avoid once you know you have to.
The context: recreating textures after they may possibly have been zapped when the activity is in the background, so it was a glDeleteTextures( textureList.size(), …) in onSurfaceCreated(). Obviously at startup I don’t have any textures loaded yet, so it instantly raises GL_INVALID_VALUE.

In other news, today I learned that annotations with primitive array values cause pre-froyo Dalvik to segfault. Every time.
ಠ_ಠ