feat: multiple spheres
This commit is contained in:
parent
8c9bacbd04
commit
16bc542a69
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue