Gamua / Starling-Framework

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

Shared context and default stencil reference value #995

Closed oddwhocanfly closed 6 years ago

oddwhocanfly commented 6 years ago

Hello,

Since some recent update, Starling now uses non zero default stencil value. If graphics context is shared and user calls Context3D.clear() and Starling.nextFrame() manually, there is no way no specify of even get the initial stencil value expected by Starling. In my case, Context3D.clear() was called with all default parameters and after placing any masked display object i would get black screen.

Can you please consider making Painter.DEFAULT_STENCIL_REFERENCE_VALUE constant a public property or, at least, make it a public constant, so Starling.nextFrame() caller can take it into account?

Regards, Alexander

PrimaryFeather commented 6 years ago

You are perfectly right, it's important that this value is available for external access. I just renamed it to DEFAULT_STENCIL_VALUE and made it public.

Thanks a lot for the suggestion, Alexander!