This project demonstrates the creation of a 3D scene using OpenGL. The scene encompasses a textured background, composite 3D objects, multiple light sources, and an atmospheric attenuation effect.
- A textured background.
- Five 3D composite objects, each composed of at least five geometric shapes.
- Two distinct light sources with varying lighting colors.
- An atmospheric attenuation effect, specifically fog.
- Efficient rendering using complex display lists.
Clone this repository into your local machine using the following command:
git clone https://github.com/vmsaif/basic-3D-scene-creation-in-openGL
Ensure you have Visual Studio installed. If not, download it from Visual Studio Official Website.
This project requires the OpenGL library or glut.h
. The easiest way to set it up in Visual Studio is as follows:
- Go to the directory where you cloned the project.
- Open the
basic 3D Scene Creation in OpenGL.sln
file to open the project in Visual Studio. - Click on
Project
in the menu bar. - Select
Manage NuGet Packages
.(If you don't see it, close the VS window, then resume from step 2.) - Click on the "Browse" tab.
- Search for "freeglut".
- Select "nupengl.core" (which includes freeGLUT) and click
Install
.(If already installed, then uninstall then install again).
Note: This installation will only be available for this project.
- Open the project in Visual Studio.
- Press
F5
or click onRun Without Debugging
.
The background image used in this project was sourced from Freepik.