According to the OpenGL docs, glGenTextures indicates failure not through
returning a value in its out parameter but rather via the glGetError API.
Moreover it could not actually indicate failure in the way this call site was
expecting because the out parameter is unsigned, not signed. This issue was
identified while investigating the cause of the following compiler warning:
glcomptexture.c: In function ‘glCompSetAddNewTexture’:
glcomptexture.c:45:12: warning: comparison of unsigned expression < 0 is
always false [-Wtype-limits]
if (t->id < 0) /*for some opengl based error , texture couldnt be created */
^