Skip to content

angeluriot/Graphics_skeleton

Repository files navigation

🦴 Graphics skeleton

Release Language Size Open Source


This repository is a skeleton C++ project containing several graphics libraries : GLM, GLEW, SFML, ImGui, ImGui-SFML and Dimension3D. It is perfect for 2D and 3D graphics applications with windows and menus.


⚠️ This repository contains submodules, add --recurse-submodules when cloning ⚠️



📋 Summary


🛠️ Install

I recommend using VS Code.


🪟 Windows

What you need

How to compile it?

  • Visual Studio (recommended) :

    • Run the vs32_run.bat (for 32 bits) or the vs64_run.bat (for 64 bits) to create the project

    • Then run the file in .sln in the build folder

(Run the .bat file again each time you add or remove a file)

  • MinGW (not recommended) :

    • Open a terminal in the project root and type : .\mingw_run.bat to create and compile the project

    • Then type : .\build\App.exe to run the program (or something else if you changed the name)

(Type the first command when you want to compile and the second when you want to run the program)


🐧 Unix

What you need

The easiest way is to open a terminal and type : sudo apt update and sudo apt upgrade, then type :

  • For Linux : sudo apt install gcc g++ make cmake gdb freeglut3 libglew

  • For MacOS : sudo apt install clang clang++ make cmake lldb freeglut3 libglew

How to compile it?

  • Open a terminal in the project root and type : bash unix_run.sh to create and compile the project

  • Then type : ./build/App to run the program (or something else if you changed the name)

(Type the first command when you want to compile and the second when you want to run the program)


💎 Using VS Code (recommended)

What you need

How to compile it?

  • Ctrl + Shift + P and type "scan for kits", then choose you compiler (I recommend the Visual Studio compiler for Windows)

  • Choose "debug" or "release" at the bottom

  • Go to "Preferences", then "Settings" and type "cmake debug", then clic on "Edit in settings.json" that will open the settings.json file

  • Add this at this end (don't forget the comma on the previous element) :

     "cmake.debugConfig": {
     	"cwd": "${workspaceFolder}"
     }
  • If there is a build folder, delete it and reload VS Code

  • Wait until the CMakeLists.txt runs or choose again "debug" or "release" at the bottom

(Choose "debug" or "release" again each time you add or remove a file and clic on the play button at the bottom to compile and run the program)


🗓️ Releases

If you want to test the demo without compiling it, you can see the releases.


🙏 Credits