render to texture works correctly now, added parameter to disable mipmap generation in texturemanager.