Language: 🇷🇸
Computer Graphics course material for the Faculty of Technical Sciences.
- base: Contains the base code which can be expanded upon for projects and learning
- demo: Contains a demo project showing off what's possible with OpenGL
- week-x: Contains x week's material
- additional_materials: Contains additional learning materials
Note: If you wish to use other libraries, consult with Jovan Ivošević at ivosevic.jovan@uns.ac.rs.
- GLFW
- GLEW
- GLM
- Assimp
If you want to use a project with preinstalled packages, you can use the starter project with all the required libraries already setup.
Make sure to select "Desktop development with C++" in Visual Studio Installer
- From the "base" branch, download the starter project for your course
- Open it in Visual Studio and check your NuGet packages, you might have to restore them if you're getting build errors
- After that you're set to go! No further setup required. If there is an issue, please notify us so we could address it
- Create a new C++ console app in Visual Studio
- With your project's .cpp file open, click on "Project" in toolbar
- Select Manage "NuGet Packages..."
- Select the "Browse" tab and enter the package name in the search field
- For GLFW enter "glfw" and install the package by Marcus Geelnard and Camilia Berglund
- In the same manner install the following NuGet packages:
- glew-2.2.0 by NerdTronik
- glm by GLM contributors (versions 0.9.9.800 and higher)
Packages might differ depending on your distro, if not listed, contact ivosevic.jovan@uns.ac.rs to update.
- Create a folder for your code (you can use the .cpp and .hpp files from the repo)
Manjaro, EndeavourOS, etc...
- To install GLM, GLFW, GLEW and Assimp:
sudo pacman -S glm glfw glew assimp
Ubuntu, Pop, Deepin, Kali
sudo apt install libglfw3 libglfw3-dev libglm-dev libglew-dev assimp
You can use make, cmake or any other build tool, but for most purposes this command will suffice:
# To compile (run this command inside your code dir, where all the .cpp and .hpp files are). NOTE: pkg-config is surrounded by backticks `, not by quotes '
g++ -o <your_program_name> *.cpp `pkg-config --libs glfw3 glew assimp` -ldl
# To run
./<your_program_name>
You can paste this code into a .sh file, e.g.: build.sh and run chmod +x build.sh
only once in order to make it runnable, then to run it just type: ./build.sh