Start preview feature. Add dummy triangle to test OpenGL.
This commit is contained in:
9
resources/shaders/polygon.fs.glsl
Normal file
9
resources/shaders/polygon.fs.glsl
Normal file
@@ -0,0 +1,9 @@
|
||||
#version 330 core
|
||||
|
||||
out vec4 FragColor;
|
||||
in vec4 vertex_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vertex_color;
|
||||
}
|
12
resources/shaders/polygon.vs.glsl
Normal file
12
resources/shaders/polygon.vs.glsl
Normal file
@@ -0,0 +1,12 @@
|
||||
#version 330 core
|
||||
|
||||
//uniform mat4 mvp;
|
||||
uniform vec4 const_color;
|
||||
|
||||
layout (location = 0) in vec2 input_vertex;
|
||||
out vec4 vertex_color;
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(input_vertex.x, input_vertex.y, 0.0, 1.0);
|
||||
vertex_color = const_color;
|
||||
}
|
Reference in New Issue
Block a user