Skip to content

OpenGL Concepts for Beginners: A collection of simple OpenGL concepts implemented in C++ using GLFW and Glad. Includes examples of basic rendering techniques such as drawing shapes, handling input, and implementing simple shaders.

Notifications You must be signed in to change notification settings

HackersAccount/ComputerGraphicsMastersProject

Repository files navigation

Table of Contents

Table of Contents

  1. Computer Graphics Masters Project
  2. Objective
  3. Graphics Pipeline
  4. Project Structure
  5. Getting Started
  6. Contributing
  7. License

Computer Graphics Masters Project

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.

Objective

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.

Graphics Pipeline

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:

Vertex Processing:

Input: Vertices defined in object space.
Processing: Transformation into clip space using model, view, and projection matrices.
Output: Transformed vertices in clip space.

Primitive Assembly:

Input: Transformed vertices from vertex processing.
Processing: Assembling vertices into geometric primitives (points, lines, or triangles).
Output: Primitives ready for rasterization.

Rasterization:

Input: Geometric primitives from primitive assembly.
Processing: Determining which pixels are covered by each primitive.
Output: Fragments with associated attributes (position, color, depth).

Fragment Processing:

Input: Fragments from rasterization.
Processing: Applying fragment shaders to determine final pixel colors.
Output: Final pixel colors.

Framebuffer Operations:

Input: Final pixel colors from fragment processing.
Processing: Optional operations like blending, depth testing, and stencil testing.
Output: Pixel colors displayed on the screen.

Project Structure

The project is structured into multiple directories, each focusing on a specific computer graphics concept. Here's an overview of the project structure:

  • src/: Contains source code for each graphics concept.

    • basic_triangle_rendering/: Demonstrates rendering a basic triangle.

    • texturing/: Covers texture mapping and sampling techniques.

    • shading/: Explores different shading models (e.g., Phong, Gouraud).

    • lighting/: Illustrates various lighting models and techniques.

    • transformations/: Discusses transformations (translation, rotation, scaling) in 3D graphics.

    • framebuffer_objects/: Introduces framebuffer objects for off-screen rendering.

    • 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.

Getting Started

To get started with the Computer Graphics Masters Project, follow these steps:

  1. 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>
  2. 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.

  3. 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
  4. 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
  5. 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.

  6. 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.

  7. 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.

Contributing

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

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

OpenGL Concepts for Beginners: A collection of simple OpenGL concepts implemented in C++ using GLFW and Glad. Includes examples of basic rendering techniques such as drawing shapes, handling input, and implementing simple shaders.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published