- Computer Graphics Masters Project
- Objective
- Graphics Pipeline
- Project Structure
- Getting Started
- Contributing
- License
Welcome to the Computer Graphics Masters Project repository! This project aims to simplify the understanding of computer graphics concepts by providing a structured and comprehensive codebase. Whether you're a student, educator, or enthusiast, this repository serves as a valuable resource for learning and experimenting with various computer graphics topics.
The primary objective of this project is to simplify computer graphics concepts for learners at the master's level. By providing a well-organized codebase with detailed explanations and examples, we aim to demystify complex graphics principles and make them accessible to a wider audience.
The graphics pipeline is the backbone of any rendering system, responsible for transforming geometric data into pixel colors on the screen. Here's a detailed breakdown of the graphics pipeline stages:
Input: Vertices defined in object space.
Processing: Transformation into clip space using model, view, and projection matrices.
Output: Transformed vertices in clip space.
Input: Transformed vertices from vertex processing.
Processing: Assembling vertices into geometric primitives (points, lines, or triangles).
Output: Primitives ready for rasterization.
Input: Geometric primitives from primitive assembly.
Processing: Determining which pixels are covered by each primitive.
Output: Fragments with associated attributes (position, color, depth).
Input: Fragments from rasterization.
Processing: Applying fragment shaders to determine final pixel colors.
Output: Final pixel colors.
Input: Final pixel colors from fragment processing.
Processing: Optional operations like blending, depth testing, and stencil testing.
Output: Pixel colors displayed on the screen.
The project is structured into multiple directories, each focusing on a specific computer graphics concept. Here's an overview of the project structure:
-
- More concepts
...
-
external/
: Contains external dependencies such as GLFW and Glad. -
build/
: Generated by CMake, contains build files. -
CMakeLists.txt
: Top-level CMake configuration file.
To get started with the Computer Graphics Masters Project, follow these steps:
-
Clone the Repository: Clone the project repository to your local machine using Git. Open a terminal or command prompt and run the following command:
git clone <repository_url>
-
Install Dependencies: Before building the project, ensure you have the following dependencies installed on your system:
CMake
GLFW
Glad
Installation instructions for these dependencies can typically be found on their respective websites.
-
Navigate to the Project Directory: Once you've cloned the repository and installed the dependencies, navigate to the project directory using the terminal or command prompt:
cd ComputerGraphicsMastersProject
-
Create a Build Directory: Create a directory to store the build files. It's a good practice to keep build files separate from the source code. Run the following command to create a build directory:
mkdir build
-
Generate Build Files with CMake: Use CMake to generate the necessary build files (e.g., Makefiles, Visual Studio solution) in the build directory. Run the following command:
cd build cmake ..
This command configures the build process based on the project's CMakeLists.txt file.
-
Build the Project: Once the build files are generated, you can build the project using your preferred build system. For example, if you're using Makefiles, run the following command:
make
If you're using Visual Studio, open the generated solution file and build the project from within the IDE.
-
Explore Graphics Concepts: After successfully building the project, you can explore various graphics concepts by running individual targets. Each concept is organized into its own directory under the
src/
directory. Navigate to the directory of the concept you're interested in and run the corresponding executable.
Contributions to the project are welcome! If you have ideas for new concepts, improvements to existing code, or bug fixes, feel free to open an issue or submit a pull request. License
This project is licensed under the MIT License. See the LICENSE file for details.