odin(sdl-opengl-rendering): Use a VAO
This commit is contained in:
parent
41fdea4be2
commit
411d5d1ccb
3 changed files with 55 additions and 36 deletions
odin/sdl-opengl-rendering/src
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue