GLuint id[1] = { 0 };
glGenQueriesARB( 1, id );
assert( glIsQueryARB( id[0] ) ); // *WILL* assert because query object not yet created.
void GenQueriesARB(sizei n, uint *ids);
returns <n> previously unused query object names in <ids>. These
names are marked as used, but no object is associated with them until
the first time they are used by BeginQueryARB.
It isn’t a querry object until after you issue the command BeginQuery. This is similar to (but different from) texture objects where GenTextures marks the name used but doesn’t create an object until a subsequent BindTexture.