make sure it is really the glGenTextures call

that one is actually not allowed to create a GL_INVALID_OPERATION in
OpenGL 3.3+

Change-Id: I853c63cfd7a30d4f61e562082cc24959c0fe6c07