Render square from vertex buffer

This commit is contained in:
2026-05-15 20:06:05 -08:00
parent 0e348fe0a0
commit b36f5b0b84
6 changed files with 190 additions and 13 deletions
+2 -6
View File
@@ -1,11 +1,7 @@
#version 450
vec2 positions[3] = vec2[](
vec2(0.0, -0.5),
vec2(0.5, 0.5),
vec2(-0.5, 0.5)
);
layout(location=0) in vec2 in_position;
void main() {
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
gl_Position = vec4(in_position, 0.0, 1.0);
}