adding mipmap generation and making filtermethod choosable