librender: Implement basic mipmapping