feat: multiple spheres

This commit is contained in:
ktyl 2023-08-14 01:34:00 +02:00
parent 8c9bacbd04
commit 16bc542a69
1 changed files with 5 additions and 2 deletions

View File

@ -51,7 +51,8 @@ int main()
GLuint litProgram = compileShaderProgram("./frag_lit.glsl");
GLuint unlitProgram = compileShaderProgram("./frag_unlit.glsl");
Icosphere sphere(0.5, 2, litProgram, glm::vec3(0.0, 0.0, 0.0));
Icosphere planet(0.4, 2, litProgram, glm::vec3(0.0, 0.0, 0.0));
Icosphere orbiter(0.1, 2, litProgram, glm::vec3(0.6, 0.0, 0.0));
Orbit orbit(100);
// Main loop
@ -65,7 +66,9 @@ int main()
// Render lit objects
glUseProgram(litProgram);
updateModelViewProjectionMatrix(litProgram, time);
sphere.render();
planet.render();
orbiter.render();
// Render unlit objects
glUseProgram(unlitProgram);