Use this for code snippets for your OpenGL using C++, GLFW, GLEW, GLM projects.
- A - A sphere using UV co-ordinates\
- B - A sphere with the normals at each vertex coming out (looks like a hedgehog)\
- C - A sphere lit by a point source at infinite distance (using Phong lighting)
- D - Spheres rotating like solar system and two cones in regular motion
- E - A textured (earth) UV sphere
Use ARROW keys to move around. Use MOUSE to look around.
Use 'make' on an OSX machine with at least the following settings -
- GLFW 3, GLEW and GLM are installed (use brew if not installed)
- OpenGL 4.1 needed (otherwise change the versions in the Shaders and gl_util)
El Capitan was installed on the development system.
NOT Tested on ANY windows or linux system.
assert(start\_gl())
- inmain.cpp
may not work, then setstart\_gl()
to aboolean
andassert
that