Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/openfl/display/OpenGLRenderer.hx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import lime.math.Matrix4;
class OpenGLRenderer extends DisplayObjectRenderer
{
@:noCompletion private static var __blendMinMaxSupported:Null<Bool>;
@:noCompletion private static var __standardDerivativesSupported:Null<Bool>;
@:noCompletion private static var __complexBlendsSupported:Null<Bool>;
@:noCompletion private static var __coherentBlendsSupported:Null<Bool>;
@:noCompletion private static var __sRGBWriteControlSupported:Null<Bool>;
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions src/openfl/display/Shader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,6 @@ class Shader
}

var complexBlendsSupported = OpenGLRenderer.__complexBlendsSupported && isFragment;
var standardDerivativesSupported = OpenGLRenderer.__standardDerivativesSupported && isFragment;

#if lime
if (__context.__context.type == OPENGL)
Expand All @@ -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.

Expand Down
9 changes: 1 addition & 8 deletions src/openfl/display3D/textures/TextureBase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions src/openfl/utils/_internal/ShaderMacro.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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";
}

/**
Expand Down
Loading