Ajout de la classe:

Scene, VertexArray, Shader, ShaderUtils, BufferUtils, FileUtils, Matrix4f, Vector3f
Ajout des shaders de test:
vert.vert et frag.frag dans le dossier shaders
This commit is contained in:
Antoine
2021-05-13 20:40:21 +02:00
parent 4e88d1d1a4
commit b02119dca7
22 changed files with 192 additions and 331 deletions

View File

@ -1,14 +0,0 @@
# version 330 core
layout (location = 0) out vec4 color;
in DATA {
vec2 tc;
} fs_in;
uniform sampler2D tex;
void main()
{
color = texture(tex, fs_in.tc);
}

View File

@ -1,16 +0,0 @@
# version 330 core
layout (location = 0) in vec4 position;
layout (location = 2) in vec2 tc;
uniform mat4 pr_matrix;
out DATA {
vec2 tc;
} vs_out;
void main()
{
gl_Position = pr_matrix * position;
vs_out.tc = tc;
}

7
shaders/frag.frag Normal file
View File

@ -0,0 +1,7 @@
#version 330 core
out vec4 FragColor;
void main()
{
FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f);
}

7
shaders/vert.vert Normal file
View File

@ -0,0 +1,7 @@
#version 330 core
layout (location = 0) in vec3 aPos;
void main()
{
gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);
}