Skip to content

Commit 96f68a6

Browse files
committed
Context3D: fix internal shaders to use #pragma header.
1 parent 5399946 commit 96f68a6

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/openfl/display/_internal/Context3DAlphaMaskShader.hx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ class Context3DAlphaMaskShader extends Shader
1212
{
1313
public static var opaqueBitmapData:BitmapData = new BitmapData(1, 1, false, 0);
1414

15-
@:glFragmentSource("varying vec2 openfl_TextureCoordv;
16-
17-
uniform sampler2D openfl_Texture;
15+
@:glFragmentSource("#pragma header
1816
1917
void main(void) {
2018
@@ -31,11 +29,7 @@ class Context3DAlphaMaskShader extends Shader
3129
}
3230
3331
}")
34-
@:glVertexSource("attribute vec4 openfl_Position;
35-
attribute vec2 openfl_TextureCoord;
36-
varying vec2 openfl_TextureCoordv;
37-
38-
uniform mat4 openfl_Matrix;
32+
@:glVertexSource("#pragma header
3933
4034
void main(void) {
4135

src/openfl/display/_internal/Context3DMaskShader.hx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ class Context3DMaskShader extends Shader
1212
{
1313
public static var opaqueBitmapData:BitmapData = new BitmapData(1, 1, false, 0);
1414

15-
@:glFragmentSource("varying vec2 openfl_TextureCoordv;
16-
17-
uniform sampler2D openfl_Texture;
15+
@:glFragmentSource("#pragma header
1816
1917
void main(void) {
2018
@@ -31,11 +29,7 @@ class Context3DMaskShader extends Shader
3129
}
3230
3331
}")
34-
@:glVertexSource("attribute vec4 openfl_Position;
35-
attribute vec2 openfl_TextureCoord;
36-
varying vec2 openfl_TextureCoordv;
37-
38-
uniform mat4 openfl_Matrix;
32+
@:glVertexSource("#pragma header
3933
4034
void main(void) {
4135

0 commit comments

Comments
 (0)