{"id":23401198,"url":"https://github.com/upf-gti/cgframeworkstudent","last_synced_at":"2025-04-11T19:12:37.086Z","repository":{"id":65315124,"uuid":"588559178","full_name":"upf-gti/CGFrameworkStudent","owner":"upf-gti","description":"C++ Framework for Computer Graphics Course at UPF","archived":false,"fork":false,"pushed_at":"2025-01-17T12:26:43.000Z","size":61388,"stargazers_count":10,"open_issues_count":1,"forks_count":29,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-25T15:07:14.236Z","etag":null,"topics":["cg","computer-graphics","opengl","rasterization","sdl2"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/upf-gti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-13T12:20:40.000Z","updated_at":"2025-02-12T11:57:01.000Z","dependencies_parsed_at":"2024-12-19T18:29:04.418Z","dependency_job_id":null,"html_url":"https://github.com/upf-gti/CGFrameworkStudent","commit_stats":null,"previous_names":["upf-gti/cgframeworkstudent"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upf-gti%2FCGFrameworkStudent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upf-gti%2FCGFrameworkStudent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upf-gti%2FCGFrameworkStudent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upf-gti%2FCGFrameworkStudent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upf-gti","download_url":"https://codeload.github.com/upf-gti/CGFrameworkStudent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248465346,"owners_count":21108244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cg","computer-graphics","opengl","rasterization","sdl2"],"created_at":"2024-12-22T11:14:45.621Z","updated_at":"2025-04-11T19:12:37.079Z","avatar_url":"https://github.com/upf-gti.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Computer Graphics\n\nClone and initialize the repository:\n```\ngit clone --recurse-submodules -j8 https://github.com/upf-gti/CGFrameworkStudent.git\n```\n\nThe framework provided is compatible with all operating systems.\nThe steps for each platform are mandatory to be able to build the framework.\nThe mandatory C++ IDEs are the following:\n\n* MS Visual Studio Community (Windows)\n* XCode (Mac)\n* Visual Studio Code (Linux, optional for other platforms)\n\nDetailed installation information can be seen below.\n\n## Windows\n\nMS Visual Studio Community can be downloaded from [here](https://visualstudio.microsoft.com/es/free-developer-offers/). Make sure you select **\"Desktop Development with C++\"**.\n\nIn addition you need to install *CMake* which can be downloaded from [here](https://cmake.org/download/). Select \"Windows x64 Installer\" for the last version. Remember to set **\"Add CMake to PATH\"** when asked while installing, otherwhise you won't be able to call CMake from the terminal.\n\nOnce you have all required open a Windows Terminal, go to the project folder and do this steps:\n```console\ncd CGFrameworkStudent\nmkdir build\ncd build\ncmake ..\n```\n\nThis will generate a Visual Studio project inside the folder ``build/`` (.sln) that you can use to compile and debug the framework.\n\n## Mac\n\nYou need XCode installed in your system (you may need to update MacOS version), Homebrew to install the missing libraries and also *CMake*. \n\nTo install Homebrew open a terminal and run this command:\n```console\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\nContinue by installing *cmake* using this command:\n```console\nbrew install cmake\n```\n\nOnce you have all required open a MacOS Terminal, go to the project folder and do this steps:\n```console\ncd CGFrameworkStudent\nmkdir build \u0026\u0026 cd build\ncmake -G \"Xcode\" ..\n```\n\nThis will generate a XCode project inside the folder ``build/`` that you can use to compile and debug the framework.\n\n### How to solve errors in Mac build\n\nIf this process leads to cmake errors, run this command an try again:\n```console\nsudo xcode-select --reset\n```\n\nIf the error says that it cannot find C/C++ compilers, find them using:\n```console\nxcrun -find c++\nxcrun -find cc\n```\n\nThen, try to build again (inside the build directory) specifying the paths:\n```console\ncmake -D CMAKE_C_COMPILER=\"Path_of_C_compiler\" -D CMAKE_CXX_COMPILER=\"Path_of_C++_compiler\" -G Xcode ..\n```\n\n## Linux\n\nInstall *cmake*, libraries and compilers using this command:\n```console\nsudo apt install cmake\nsudo apt install build-essential\nsudo apt install -y libglu1-mesa-dev freeglut3-dev mesa-common-dev libgl1-mesa-dev\n```\n\nOnce you have all required open a Linux Terminal, go to the project folder and do this steps:\n```console\ncd CGFrameworkStudent\nmkdir build \u0026\u0026 cd build\ncmake ..\n```\n\nThis will generate a Makefile inside the folder ``build/`` that you can use to compile framework.\n\nUse ``make`` to compile. You can speed-up compilation using more threads with ``-j(num threads)``, for example: ``make -j8``.\n\n### Visual Studio Code (Linux)\n\nAfter installing all the libs for your platform, if you need a more light weight IDE which can be used in any platform (included Linux), this is your better option.\n\nVisual Studio Code can be downloaded for each platform [here](https://code.visualstudio.com/download).\n\n**NOTE**: you must have a C/C++ compiler installed and added to the path before progressing with the installation.\n\n#### Configuring VSCode\n\nAfter VSCode and the requirements for each platform are installed **(the steps for each platform are mandatory!)**, the following extensions are needed to work with C++ code:\n\n```\nC/C++\nC/C++ Extension Pack\nC/C++ Themes\nCmake Tools\n```\n\nThen, on VSCode, open the project folder where the CMakeLists.txt is located and the configuration of the project should start automatically. At this point you should be able to build and run the project using the VSCode interface. \n\nIf not, then open the CMake tab on the left of VSCode, and select the configure and build the project options.\n\nCheck [this link](https://gourav.io/blog/setup-vscode-to-run-debug-c-cpp-code) to learn how to debug the framework in Visual Studio Code.\n\n\n## Creating your own repository\n\nAfter cloning the framework's repository, if you want to work on your own repository:\n  - Open the terminal\n  - Go to the CGFrameworkStudent cloned repository folder:\n```\n  cd CGFrameworkStudent\n```\n  - Create an empty private repository on GitHub.\n  - Make the CGFrameworkStudent cloned repository point to your own repository:\n```\n  git remote set-url origin \u003cyour-repository-url.git\u003e\n```\n  - IMPORTANT make sure that both \"fetch\" and \"push\" are pointing to your repository:\n```\n  git remote -v\n```\n  - You should see something like:\n```\n  origin  \u003cyour-repository-url.git\u003e (fetch)\n  origin  \u003cyour-repository-url.git\u003e (push)\n```\n  - Update changes to the remote\n```\n  git push\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupf-gti%2Fcgframeworkstudent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupf-gti%2Fcgframeworkstudent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupf-gti%2Fcgframeworkstudent/lists"}