occlusion query IDs

are there problems(speed etc) with choosing any number for the occlusion query ID (or for that matter anything else related eg textureIDs, displaylist IDs etc)
eg in my lightcorona structure its nice to go glGetQueryObjectuiv( corona.uniqueID, … ).

uniqueID is a unique global id that most objects (lights,coronas,vehicles etc) get, which enabes me to identify it elsewhere,
because of this the value can get high > 70,000.
the reason i ask is cause i have no idea about driver internals, perhaps they like u sing a limited range eg 0-1000?
cant see why though but like i said, i know nothing.

interresting question.

Only zero id (OQ, textures…) is reserved to OpenGL internals. So it seems you can do that. However, I’ve never read anything concrete about that.

I imagine they employ a simple hash table to find the data you’re targetting. So it’s probably safe to assume the size of the number is not important, just its uniqueness.
You don’t need to use the numbers given by the glGen functions…so that’s a good clue.