BingXiong1995 / OpenGLProject

An OpenGL project using glfw & glad

Home Page:https://www.youtube.com/watch?v=ZYtrCOHmLak&feature=youtu.be

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenGL Render Engine

This is an Computer graphic class project using glad, glfw, glm

Demo https://www.youtube.com/watch?v=ZYtrCOHmLak&feature=youtu.be

Make sure your have configured glad and glfw to run these code.

Features:

  • Import model from files
  • Translation, rotation with model
  • Control the camera position
  • Add spotlights, direction lights and point lights
  • Increase or decrease the number of point lights
  • Dynamic point lights (point light position can move around)
  • Add different material to the model

Import Model

To import a model into this application is very easy. Users just need to drag a file to this window and a model will be displayed in this window.

image

Transformation

• N – Enable transformation shader (press again will disable and set the location of model to default) • Press 1,2,3 to Rotate • Press 4,5,6,7 – to translation image

Camera

To control the camera, need to enable material shader first, because the code of control camera is in material shader, press Z to enable material shade.

  • W – move forward
  • S – move backward
  • A – move left
  • D – move right
  • E – move down
  • T – move up
  • Mouse input

image

Material

  • Z - add material and one light
  • M - Bronze material
  • P - White plastic material
  • C - Ruby Material
  • O - Dynamic Material

image

image

Lighting

  • V - Disable all the shaders
  • X – Enable Multiple lights, direction lights and points light
  • Press mouse left button or right button to increase or decrease the number of points lights.
  • Z – Enable Dynamic point light (need to press V to disable lighting shader)
  • R – show rotate light. image image

About

An OpenGL project using glfw & glad

https://www.youtube.com/watch?v=ZYtrCOHmLak&feature=youtu.be


Languages

Language:C++ 76.1%Language:C 23.7%Language:CMake 0.2%