/OpenGL_Practice2

Polygonal objects and directional/point/spot lights with Phong reflection model.

Primary LanguageC++

Phone Reflection (OpenGL)

Objects with Phong reflection model and directional/point/spot lights.

This program

  • loads polygonal OBJ files
  • renders 3D models in modern OpenGL
  • controls objects using the mouse
  • sets up light sources and material properties

To control the objects,

  • Drag the mouse to rotate the object.
  • Scroll the mouse to change the object's sizes.
  • Press F1 to switch to a bunny object.
  • Press F2 to switch to a dragon object which has no diffuse reflection.
  • Press F3 to switch to a bear object which has no specular reflection.
  • Press n to change colors to ones based on normal vectors.
  • Press 1 to toggle the point light rotation on/off.
  • Press 2 to toggle the spot light rotation on/off.
  • Press 3 to toggle the directional light rotation on/off.
  • Press SHIFT+1 to toggle the point light on/off.
  • Press SHIFT+2 to toggle the spot light on/off.
  • Press SHIFT+3 to toggle the directional light on/off.
  • Press e/E to make the spot edge sharper/blurrier.
  • Press w/W to make the spot wider/narrower.

image image image image image image image image image image image