Change present mode to Mailbox
This commit is contained in:
parent
440fc05e55
commit
3f367e19ac
3 changed files with 22 additions and 7 deletions
|
|
@ -167,8 +167,13 @@ mod vs {
|
|||
|
||||
layout(location = 0) in vec2 position;
|
||||
|
||||
layout(location = 0) out vec3 fragColor;
|
||||
|
||||
vec3 colors[3] = vec3[](vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), vec3(0.0, 0.0, 1.0));
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(position, 0.0, 1.0);
|
||||
fragColor = colors[gl_VertexIndex];
|
||||
}
|
||||
",
|
||||
}
|
||||
|
|
@ -180,10 +185,12 @@ mod fs {
|
|||
src: r"
|
||||
#version 450
|
||||
|
||||
layout(location = 0) in vec3 fragColor;
|
||||
|
||||
layout(location = 0) out vec4 f_color;
|
||||
|
||||
void main() {
|
||||
f_color = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
f_color = vec4(fragColor, 1.0);
|
||||
}
|
||||
",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue