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:
@ -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);
|
||||
}
|
@ -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
7
shaders/frag.frag
Normal 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
7
shaders/vert.vert
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user