Fix for direct rendering on win.