glGenTextures(1, &textureid);
Assuming that the texture was created succesfully, could textureid be 0?
The manual page for glGenTextures()
says see also glIsTexture()
; the latter will (according to that) always return GL_FALSE
for a texture name of 0. So, 0
can't be a valid texture name.