Computer Graphics
  • 5CM507 Graphics 25-26
  • Module
  • Schedule
    • Term 1 Schedule
    • Term 2 Schedule
  • Assessments
    • Coursework 1 (CW1)
    • Coursework 2 (CW2)
  • Lectures A
    • L01 Overview of Computer Graphics
    • L02 Mathematics
  • Labs A
    • LabA0 Environment Setup
      • Using a Git Repository
      • Checking or Installing Software
      • Creating a Project Framework
    • LabA01 Drawing 2D Triangles
      • Early OpenGL
      • Modern OpenGL
    • LabA02 Load Meshes and Calculate Normals
      • How to Represent a Mesh
        • Mesh Data Structure in C++
        • Mesh Data Structure in WebGL
        • The OBJ Mesh Format
      • Normal Calculation
      • Calculating Normals in C++
    • LabA03 Transformations
    • LabA04 Scene Graph
    • LabA05 Projections
    • LabA06 Lighting
    • LabA07 Shaders
    • LabA08 Texture Mapping
  • Lectures B
  • Labs B
  • Resources
  • People
    • Module Leader
    • The Games Group@Derby
    • Senior External Consultants
Powered by GitBook
On this page
  • Step 1 Create your own git respository account
  • Step 2 Create a git repository project
  • Step 3 Coding your project
  • Git submodule Update
  • Step 4 Commit your source code
  1. Labs A
  2. LabA0 Environment Setup

Using a Git Repository

Step 1 Create your own git respository account

Step 2 Create a git repository project

Option A

  1. Create A Local Project

  2. Add the project to a git repository, such as Github

Adds the files in the local repository and stages them for commit. To unstage a file, use 'git reset HEAD YOUR-FILE'.

Commits the tracked changes and prepares them to be pushed to a remote repository. To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again.

$ git init -b main
$ git add .
$ git commit -m "First commit"

Option B

  1. Create an empety project on github.com

  2. Clone the project locally

Step 3 Coding your project

Create and edit your source code locally

Using git submodule or gitclone to retrieve libraries you need, such as GLEW, GLEW, glm, etc

Git submodule Update

git submodule update --init --recursive 
git submodule update --recursive --remote

Step 4 Commit your source code

Using git to clone and edit your project on other computers

PreviousLabA0 Environment SetupNextChecking or Installing Software

Last updated 3 months ago