File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ class OpenGLRenderer extends DisplayObjectRenderer
7373 @:noCompletion private static var __staticDefaultDisplayShader : DisplayObjectShader ;
7474 @:noCompletion private static var __staticDefaultGraphicsShader : GraphicsShader ;
7575 @:noCompletion private static var __staticMaskShader : Context3DMaskShader ;
76+ @:noCompletion private static var __sRGBWriteControlSupported : Null <Bool >;
7677 @:noCompletion private static var __complexBlendsSupported : Null <Bool >;
7778 @:noCompletion private static var __coherentBlendsSupported : Null <Bool >;
7879
@@ -142,6 +143,21 @@ class OpenGLRenderer extends DisplayObjectRenderer
142143 }
143144 #end
144145
146+ #if lime
147+ if (__context .type == OPENGLES )
148+ {
149+ if (__sRGBWriteControlSupported == null )
150+ {
151+ __sRGBWriteControlSupported = gl .getSupportedExtensions ().contains (" EXT_sRGB_write_control" );
152+ }
153+
154+ if (__sRGBWriteControlSupported )
155+ {
156+ gl .disable (0x8DB9 ); // GL_FRAMEBUFFER_SRGB_EXT
157+ }
158+ }
159+ #end
160+
145161 if (__complexBlendsSupported == null )
146162 {
147163 var extensions = gl .getSupportedExtensions ();
Original file line number Diff line number Diff line change @@ -1239,6 +1239,8 @@ class Stage extends DisplayObjectContainer #if lime implements IModule #end
12391239
12401240 if (__renderer != null )
12411241 {
1242+ __renderer .__clear ();
1243+
12421244 __renderer .__allowSmoothing = (quality != LOW );
12431245 __renderer .__pixelRatio = #if openfl_disable_hdpi 1 #else window .scale #end;
12441246 __renderer .__worldTransform = __displayMatrix ;
You can’t perform that action at this time.
0 commit comments