SolarModern is sample C++ code illustrating the use of Modern OpenGL. It is part of a set of programs introducing the use of Modern OpenGL, which are intended to accompany a possible second edition of the book 3D Computer Graphics: A mathematical approach with OpenGL, Cambridge University Press, 2003.

SolarModern shows a simple solar system containing sun, the earth and a moon. It consists of three core source files, SolarModern.cpp, ShaderMgrSLR.cpp, and ShaderMgrSLR.h; plus five source files that provide functions to handle 3-dimensional vectors and 4-dimensional vectors, and 4 source files for rendering spheres. There are several options available for downloading this program:

Things to try out:

  1. Compile and run the program.
  2. Check out the new features of the SolarModern program (which are not already present in SimpleDrawModern or SimpleAnimModern):
    • Animation with fixed time step.
    • Animation rate based on elapsed time using glfwGetTime().
    • Using the projection matrix to view a scene with perspective.
    • See time aliasing effects, especially from the rotation of the earth.
    • Using the GlGeomSphere class, defined in GlGeomSphere.h and GlGeomSphere.cpp.
  3. Understand what causes the time aliasing in fixed time step mode
  4. Understand why there is also aliasing with large time steps.
  5. See the more detailed description of the software and its functionality.

Version 1.4 of SolarModern, October 5, 2022.