Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.82k stars 821 forks source link

Back buffer can be left in unknown state #964

Closed johncridges closed 7 years ago

johncridges commented 7 years ago

When setting Starling.shareContext false, the back buffer is not necessarily set back to the Starling viewport. I suggest the following change in Starling.as:


        public function set shareContext(value : Boolean) : void
        {
            if (!value) {
                _previousViewPort.setEmpty();
            }
            _painter.shareContext = value;
        }
PrimaryFeather commented 7 years ago

Thanks a lot for the heads-up and the suggested fix, John! Makes sense.