This repository contains a compendium of small OpenGL applications built to demonstrate concepts of Computer Graphics. It is used as support material for the Computer Graphics course at the Federal University of Fronteira Sul. The demos in this repository were mainly created by Cesar Tadeu Pozzer at the Federal University of Santa Maria.
Course responsible: Fernando Bevilacqua [fernando.bevilacqua@uffs.edu.br]
All demos should work fine on Windows and Linux. Follow the guides below according to the platform you are using.
Ensure that your machine has up-to-date graphic drivers and a development environment is installed, e.g. Visual Studio Community. You also need git installed.
Clone this repository in a folder of your choice, e.g. c:\
:
git clone https://github.com/Dovyski/opengl-demos.git opengl-demos && cd opengl-demos
Open the solution file named OpenGL-demos.sln
to load all the demos/projects.
If you want to test all demos/projetcs right away, after opening the solution file, go to Build -> Build Solution
(or press F7). If nothing goes wrong, you should see several executable files in the folder build\x64\Debug
(or build\x64\Release
if you compiled using the release configuration)
You can compile and run any of the demos/projects individually by right-clicking it in the solution explorer, then selecting Set as Startup Project
. After that, hit F5 and the project will compile and run.
Ensure that your machine has up-to-date graphic drivers and a development environment is installed, e.g. build-essential
is installed. If you are not sure you have a dev environment setup, run:
sudo apt update && sudo apt install build-essential git
Clone this repository in a folder of your choice, e.g. /tmp
:
git clone https://github.com/Dovyski/opengl-demos.git opengl-demos && cd opengl-demos
The demos use several 3rd-party libraries that must be installed. You can install them all by running the following command in the project root folder (the one containing the Makefile
and OpenGL-demos.sln
files):
make install-deps
The command will ask for a sudo password and proceed with the installation of all dependencies.
If you want to test all demos/projetcs right away, you can use make
to build them at once. In the project root folder, run:
make all
You can compile and run any of the demos/projects individually by running the command make <demo-name>
where <demo-name>
is the name of a demo. For example, to compile the demo rotating-cube
, run:
make rotating-cube
If you want to list the name of all available demos or get help about the build process, run:
make help
You can also compile a particular demo by navigating into its source code folder and running make
there:
cd src/rotating-cude && make
There are several demos that use Three.js, a lightweight cross-browser JavaScript library/API used to create and display animated 3D computer graphics on a Web browser.
To improve your experience with the demos related to Three.js
, install Visual Studio Code:
apt install code
Then install the Live Server extension:
code --install-extension ritwickdey.liveserver
Finally, open the opengl-demos
folder in Visual Studio Code and click the Go Live
button in the taskbar:
Demos related to three.js will be available under /src/threejs-*/
, e.g. http://127.0.0.1:5500/src/threejs-hello-world/.
The code files in this repository have mixed licenses. Please refer to each file/project to check its license.
See all changes in the CHANGELOG file.