Updated window handler. Able to render to texture.