fix: lower required OpenGL version + resolve offset bug

This commit is contained in:
2022-09-22 15:30:22 -03:00
parent 1575f517a9
commit f44a1a49fd
3 changed files with 19 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
#version 450 core
#version 330 core
out vec4 FragColor;
in vec3 ourColor;
@@ -7,8 +7,7 @@ in vec2 TexCoord;
// texture sampler
uniform sampler2D texture1;
void main()
{
FragColor = texture(texture1, TexCoord).wzyx;
void main() {
FragColor = texture(texture1, TexCoord);
}

View File

@@ -1,4 +1,4 @@
#version 450 core
#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aColor;
layout (location = 2) in vec2 aTexCoord;
@@ -6,9 +6,8 @@ layout (location = 2) in vec2 aTexCoord;
out vec3 ourColor;
out vec2 TexCoord;
void main()
{
void main() {
gl_Position = vec4(aPos, 1.0);
ourColor = aColor;
TexCoord = vec2(aTexCoord.x, aTexCoord.y);
TexCoord = aTexCoord;
}