forked from rust-windowing/winit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rust-windowing#319 from pcwalton/gl4
Add OpenGL 4.3 support to the GL backend, enabling compute shader on non-Metal platforms
- Loading branch information
Showing
25 changed files
with
1,414 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#version {{version}} | ||
// Automatically generated from files in pathfinder/shaders/. Do not edit! | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
precision highp float; | ||
precision highp sampler2D; | ||
|
||
uniform sampler2D uSrc; | ||
|
||
in vec2 vTexCoord; | ||
|
||
out vec4 oFragColor; | ||
|
||
void main(){ | ||
vec4 color = texture(uSrc, vTexCoord); | ||
oFragColor = vec4(color . rgb * color . a, color . a); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#version {{version}} | ||
// Automatically generated from files in pathfinder/shaders/. Do not edit! | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
precision highp float; | ||
precision highp sampler2D; | ||
|
||
in ivec2 aPosition; | ||
|
||
out vec2 vTexCoord; | ||
|
||
void main(){ | ||
vec2 texCoord = vec2(aPosition); | ||
|
||
|
||
|
||
vTexCoord = texCoord; | ||
gl_Position = vec4(mix(vec2(- 1.0), vec2(1.0), vec2(aPosition)), 0.0, 1.0); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#version {{version}} | ||
// Automatically generated from files in pathfinder/shaders/. Do not edit! | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
precision highp float; | ||
precision highp sampler2D; | ||
|
||
uniform vec4 uColor; | ||
|
||
out vec4 oFragColor; | ||
|
||
void main(){ | ||
oFragColor = vec4(uColor . rgb, 1.0)* uColor . a; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#version {{version}} | ||
// Automatically generated from files in pathfinder/shaders/. Do not edit! | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
precision highp float; | ||
precision highp sampler2D; | ||
|
||
uniform vec2 uFramebufferSize; | ||
|
||
in ivec2 aPosition; | ||
|
||
void main(){ | ||
vec2 position = vec2(aPosition)/ uFramebufferSize * 2.0 - 1.0; | ||
gl_Position = vec4(position . x, - position . y, 0.0, 1.0); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#version {{version}} | ||
// Automatically generated from files in pathfinder/shaders/. Do not edit! | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
precision highp float; | ||
precision highp sampler2D; | ||
|
||
uniform sampler2D uTexture; | ||
uniform vec4 uColor; | ||
|
||
in vec2 vTexCoord; | ||
|
||
out vec4 oFragColor; | ||
|
||
void main(){ | ||
float alpha = texture(uTexture, vTexCoord). r * uColor . a; | ||
oFragColor = alpha * vec4(uColor . rgb, 1.0); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#version {{version}} | ||
// Automatically generated from files in pathfinder/shaders/. Do not edit! | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
precision highp float; | ||
precision highp sampler2D; | ||
|
||
uniform vec2 uFramebufferSize; | ||
uniform vec2 uTextureSize; | ||
|
||
in ivec2 aPosition; | ||
in ivec2 aTexCoord; | ||
|
||
out vec2 vTexCoord; | ||
|
||
void main(){ | ||
vTexCoord = vec2(aTexCoord)/ uTextureSize; | ||
vec2 position = vec2(aPosition)/ uFramebufferSize * 2.0 - 1.0; | ||
gl_Position = vec4(position . x, - position . y, 0.0, 1.0); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#version {{version}} | ||
// Automatically generated from files in pathfinder/shaders/. Do not edit! | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
precision highp float; | ||
precision highp sampler2D; | ||
|
||
uniform vec4 uGroundColor; | ||
uniform vec4 uGridlineColor; | ||
|
||
in vec2 vTexCoord; | ||
|
||
out vec4 oFragColor; | ||
|
||
void main(){ | ||
vec2 texCoordPx = fract(vTexCoord)/ fwidth(vTexCoord); | ||
oFragColor = any(lessThanEqual(texCoordPx, vec2(1.0)))? uGridlineColor : uGroundColor; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#version {{version}} | ||
// Automatically generated from files in pathfinder/shaders/. Do not edit! | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
precision highp float; | ||
precision highp sampler2D; | ||
|
||
uniform mat4 uTransform; | ||
uniform int uGridlineCount; | ||
|
||
in ivec2 aPosition; | ||
|
||
out vec2 vTexCoord; | ||
|
||
void main(){ | ||
vTexCoord = vec2(aPosition * uGridlineCount); | ||
gl_Position = uTransform * vec4(ivec4(aPosition . x, 0, aPosition . y, 1)); | ||
} | ||
|
Oops, something went wrong.