Change MAX_TEXTUREUNITS from 16 to 32 - this fixes a memory corruption that was causing all kinds of problems (e.g. cachepic issues).
Get rid of vid.texarrayunits, vid.teximageunits, vid.texunits variables as they are meaningless, assume 32 (because that is how many GL enums exist).
Don't clear texture units on reset, we don't know how many texture units really exist and it's largely pointless.
Do a more thorough unbind of textures on deletion, just for good measure.
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12437
d7cf8633-e32d-0410-b094-
e92efae38249