Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

OpenGL 3D Scene — Mini-Course Project

A 3D scene with procedurally generated spheres, real-time camera controls, and custom vertex/fragment shaders using OpenGL 3.3.

Overview

This project renders a 3D scene featuring multiple color-coded spheres with smooth shading, built entirely with modern OpenGL (core profile). The scene includes a free-look camera with mouse and keyboard controls, perspective projection, and per-vertex coloring through custom GLSL shaders.

Features

  • Procedural sphere generation using parametric UV sphere tessellation
  • Multiple objects with distinct colors and scales
  • Free-look camera with WASD movement, mouse look, and scroll zoom
  • Custom GLSL shaders — vertex shader for transformations, fragment shader for coloring
  • Real-time rendering with delta-time-based movement

Controls

Input Action
W / A / S / D Move camera forward / left / back / right
Mouse Look around
Scroll Zoom in/out
ESC Close window

Tech Stack

  • C++ (OpenGL 3.3 Core Profile)
  • GLFW — window management and input
  • GLAD — OpenGL function loader
  • GLM — mathematics (vectors, matrices, transformations)
  • GLSL — vertex and fragment shaders

Building

Requires CMake and OpenGL development libraries:

cd OpenGL
mkdir build && cd build
cmake ..
make
./OpenGL

Project Structure

OpenGL/
├── OpenGL/
│   ├── Main.cpp       # Application entry point and rendering loop
│   ├── vshader.vs     # Vertex shader (MVP transformations)
│   └── fshader.fs     # Fragment shader (color output)
└── Libraries/         # GLAD, GLFW, GLM headers

Team

Name Student Number
Mehrshad Mirmohammadi 98109634
Ghazal Shenavar 97101897

Computer Graphics Mini-Course, Summer 2021

About

3D scene with procedural spheres, camera controls, and GLSL shaders — OpenGL 3.3 Core Profile

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages