use program pipelines instead

This commit is contained in:
2020-01-27 18:51:55 -05:00
parent 53aa778446
commit 794bf15d7f
5 changed files with 78 additions and 65 deletions

View File

@@ -1,5 +1,9 @@
#version 430
out gl_PerVertex {
vec4 gl_Position;
};
layout(location=0) uniform mat4 proj;
layout(location=1) uniform mat4 view;
@@ -8,8 +12,6 @@ layout(location=0) in vec4 pos;
out vec4 vpos;
void main() {
int i = gl_VertexID;
vpos = view * pos;
gl_Position = proj * vec4(vpos.xyz / (1), 1);
gl_PointSize = 5;
}