1
Fork 0

odin(sdl-opengl-rendering): Use a VAO

This commit is contained in:
prescientmoon 2025-03-30 16:41:14 +02:00
parent 41fdea4be2
commit 411d5d1ccb
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
3 changed files with 55 additions and 36 deletions
odin/sdl-opengl-rendering/src

View file

@ -1,7 +1,10 @@
#version 140
#version 330
in vec2 LVertexPos2D;
in vec2 aPos;
out vec4 vertexColor;
void main() {
gl_Position = vec4(LVertexPos2D.x, LVertexPos2D.y, 0, 1 );
gl_Position = vec4(aPos.x, aPos.y, 0, 1);
vertexColor = vec4((aPos.x + 1) / 2, (aPos.y + 1) / 2, 1, 1);
}