Add imgui

This commit is contained in:
2020-03-21 22:38:10 +01:00
parent b22be7d6a5
commit 4a7e0ac82a
178 changed files with 73595 additions and 94 deletions

View File

@@ -0,0 +1,8 @@
#version 330 core
layout (location = 0) in vec2 inputVertex;
void main()
{
gl_Position = vec4(inputVertex.x, inputVertex.y, 0.0, 1.0);
}

View File

@@ -0,0 +1,11 @@
#version 330 core
layout (location = 0) in vec2 inputVertex;
uniform float zoom;
uniform vec2 center_pos;
void main()
{
vec4 translated = (vec4(inputVertex.x, inputVertex.y, 0.0, 1.0) - vec4(center_pos.x, center_pos.y, 0.0, 0.0));
gl_Position = vec4(translated.x, translated.y, translated.z, translated.w) * vec4(zoom, zoom, 1, 1);
}

View File

@@ -0,0 +1,8 @@
#version 330 core
out vec4 fragmentColor;
void main()
{
fragmentColor = vec4(1.0, 0.0, 0.0, 0.0);
}

View File

@@ -0,0 +1,8 @@
#version 330 core
out vec4 fragmentColor;
void main()
{
fragmentColor = vec4(1.0, 0.0, 0.0, 0.0);
}

View File

@@ -0,0 +1,10 @@
#version 330 core
layout (location = 0) in vec2 inputVertex;
uniform mat4 model_matrix;
uniform mat4 projection_view_matrix;
void main()
{
gl_Position = projection_view_matrix * model_matrix * vec4(inputVertex.x , inputVertex.y, 0.0, 1.0);
}

View File

@@ -0,0 +1,15 @@
#version 330 core
layout (points) in;
layout (triangle_strip, max_vertices=3) out;
void main()
{
gl_Position = gl_in[0].gl_Position + vec4(-0.1, 0.0, 0.0, 0.0);
EmitVertex();
gl_Position = gl_in[0].gl_Position + vec4(0.0, 0.1, 0.0, 0.0);
EmitVertex();
gl_Position = gl_in[0].gl_Position + vec4(0.1, 0.0, 0.0, 0.0);
EmitVertex();
EndPrimitive();
}

View File

@@ -0,0 +1,17 @@
#version 330 core
layout (points) in;
layout (triangle_strip, max_vertices=3) out;
uniform float zoom;
void main()
{
gl_Position = gl_in[0].gl_Position + vec4(-0.1, 0.0, 0.0, 0.0) * zoom;
EmitVertex();
gl_Position = gl_in[0].gl_Position + vec4(0.0, 0.1, 0.0, 0.0) * zoom;
EmitVertex();
gl_Position = gl_in[0].gl_Position + vec4(0.1, 0.0, 0.0, 0.0) * zoom;
EmitVertex();
EndPrimitive();
}