Some Fixes to texture handling, and the GL_SHRINK code