texture object naming

Hello,
what i want to know is…
how glGenTextureNames and glDeleteTextures work?
For example at the beginning of the program i catch 10 names by glGenTextureNames(10,&TextureName); after a time someof my textures are useless , i want to create new ones. i want to delete useless, so i will call for ex. glDeleteTextures(3,&TextureName)
what 3 texture will opengl delete then? the first 3 in the array or 3 after the pointer given at the function… that is can we specify which texture objects to be deleted in the array?

Thankss

In your example, glDeleteTextures will delete the first three texture in the array. If you want to delete three textures not next to eachother, you have to call glDeleteTextures three times, once for each texture to be deleted.