- add vertex data
- modify vao accodingly
- bam! cube can be seen
- PROBLEM : depth is not considered
- sol :
glEnable(GL_DEPTH_TEST);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- sol :
draw more cubes:
- how?
- can add more vertices , but we can use one cube specification and draw multiple cubes
- in draw function, add cube position data and then translate the cube accordingly in world space and draw the cube
- iterate this process to get multiple cubes :)