/OpenGL-Lighting

Primary LanguageHTMLMIT LicenseMIT

ComputerGraphics

Example code for the Computer Graphics subject

You will need to set the Working Directory to the ./bin/ folder in Visual Studio, i.e. "$(ProjectDir)bin" for some of the examples to work correctly.

The aim is for every tutorial within this subject to contain a working example here, along with any other useful code samples that may help teachers best deliver this subject.

Each is implemented as an application class derived from BaseApplication. To run a certain example simply change the application being created within main.cpp.

Current working examples are:

  • SolarSystemApplication (uses Gizmos to demonstrate matrix parenting)
  • RenderingGeomApplication (rendered quad using GL VAO, VBO, IBO and hard-coded shader program)
    • RenderingOBJApplication (example using the Mesh class and Shader class)
  • TexturingApplication (texture applied across a quad using GL VAO, VBO and IBO)
    • TexturedOBJApplication (example using the Mesh class and Shader class to demonstrate textured models)
    • ApplyTextureOBJApplication (example attaching a texture to an already loaded OBJ)
  • ProceduralGenerationApplication (demonstrates using Perlin Noise to populate a texture and displacement mapping in a vertex shader)
  • GUIApplication (demonstrates using IMGUI for UI elements)
  • LightingOBJApplication (demonstrates Phong lighting on an imported OBJ untextured)
    • LightingSphereApplication (demonstrates Phong lighting on a generated sphere)