Added a bit of state trakcing for textures