Changed window member to RenderWindow for 2d drawing
Moved gfx rendering to separate thread