moved texture flags handling from shader to Texture and improved mipMapping support