From 567379433d44c76e47b51e042ac660457b494d58 Mon Sep 17 00:00:00 2001 From: MAJigsaw77 <77043862+MAJigsaw77@users.noreply.github.com> Date: Tue, 13 Jan 2026 20:13:27 +0200 Subject: [PATCH 1/2] Implement `Angle` for `Desktop` and `iOS` --- src/openfl/display3D/textures/TextureBase.hx | 9 +-------- src/openfl/utils/_internal/ShaderMacro.hx | 6 +++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/openfl/display3D/textures/TextureBase.hx b/src/openfl/display3D/textures/TextureBase.hx index 2fe9f6b7ba..46394aa97a 100644 --- a/src/openfl/display3D/textures/TextureBase.hx +++ b/src/openfl/display3D/textures/TextureBase.hx @@ -84,14 +84,7 @@ class TextureBase extends EventDispatcher { __supportsBGRA = true; __textureFormat = bgraExtension.BGRA_EXT; - - // Note: Get rid of this when `ANGLE` is added. - #if (lime && !ios && !tvos) - if (context.__context.type == OPENGLES) - { - __textureInternalFormat = bgraExtension.BGRA_EXT; - } - #end + __textureInternalFormat = bgraExtension.BGRA_EXT; } else { diff --git a/src/openfl/utils/_internal/ShaderMacro.hx b/src/openfl/utils/_internal/ShaderMacro.hx index e9b9664e5b..ec94d5d091 100644 --- a/src/openfl/utils/_internal/ShaderMacro.hx +++ b/src/openfl/utils/_internal/ShaderMacro.hx @@ -65,7 +65,7 @@ class ShaderMacro all have a second argument which, if true, will use `processGLSLText` to convert the text to be compatible with the current GLSL version. Defaults to false to prevent converting user-defined GLSL. **/ - var shouldProcess = meta.params.length > 1 && cast(meta.params[1].getValue(), Bool); + var shouldProcess = /*meta.params.length > 1 && cast(meta.params[1].getValue(), Bool)*/ true; switch (meta.name) { @@ -174,7 +174,7 @@ class ShaderMacro all have a second argument which, if true, will use `processGLSLText` to convert the text to be compatible with the current GLSL version. Defaults to false to prevent converting user-defined GLSL. **/ - var shouldProcess = meta.params.length > 1 && cast(meta.params[1].getValue(), Bool); + var shouldProcess = /*meta.params.length > 1 && cast(meta.params[1].getValue(), Bool)*/ true; switch (meta.name) { @@ -442,7 +442,7 @@ class ShaderMacro { // Specify the default glVersion. // We can use compile defines to guess the value that prevents crashes in the majority of cases. - return #if (android) "100" #elseif (web) "100" #elseif (mac) "120" #elseif (desktop) "150" #else "100" #end; + return "300 es"; } /** From 7e9c12b956398be25413029369cfd11d43c2429e Mon Sep 17 00:00:00 2001 From: MAJigsaw77 <77043862+MAJigsaw77@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:32:33 +0300 Subject: [PATCH 2/2] Revert "Add `OES_standard_derivatives` if available" This reverts commit 21ef5de843087c81bbaa4c7f3666845fe066183b. --- src/openfl/display/OpenGLRenderer.hx | 5 ----- src/openfl/display/Shader.hx | 6 ------ 2 files changed, 11 deletions(-) diff --git a/src/openfl/display/OpenGLRenderer.hx b/src/openfl/display/OpenGLRenderer.hx index 49f8a65f95..59d296d96c 100644 --- a/src/openfl/display/OpenGLRenderer.hx +++ b/src/openfl/display/OpenGLRenderer.hx @@ -55,7 +55,6 @@ import lime.math.Matrix4; class OpenGLRenderer extends DisplayObjectRenderer { @:noCompletion private static var __blendMinMaxSupported:Null; - @:noCompletion private static var __standardDerivativesSupported:Null; @:noCompletion private static var __complexBlendsSupported:Null; @:noCompletion private static var __coherentBlendsSupported:Null; @:noCompletion private static var __sRGBWriteControlSupported:Null; @@ -173,10 +172,6 @@ class OpenGLRenderer extends DisplayObjectRenderer { __coherentBlendsSupported = exts.contains("KHR_blend_equation_advanced_coherent"); } - if (__standardDerivativesSupported == null) - { - __standardDerivativesSupported = exts.contains("OES_standard_derivatives"); - } #if (js && html5) __softwareRenderer = new CanvasRenderer(null); diff --git a/src/openfl/display/Shader.hx b/src/openfl/display/Shader.hx index 1058691748..9deb9f217d 100644 --- a/src/openfl/display/Shader.hx +++ b/src/openfl/display/Shader.hx @@ -627,7 +627,6 @@ class Shader } var complexBlendsSupported = OpenGLRenderer.__complexBlendsSupported && isFragment; - var standardDerivativesSupported = OpenGLRenderer.__standardDerivativesSupported && isFragment; #if lime if (__context.__context.type == OPENGL) @@ -654,11 +653,6 @@ class Shader #end } - if (standardDerivativesSupported) - { - extensions += "#extension GL_OES_standard_derivatives : enable\n"; - } - // #version must be the first directive and cannot be repeated, // while #extension directives must be before any non-preprocessor tokens.