Skip to content

jtcurlin/cgx

Repository files navigation

cgx

curlin graphics engine

editor

Introduction

cgx is a rendering engine built with C++ and OpenGL. The project was conceived as a personal learning tool spanning a breadth of concepts, skills, and technologies, including but not limited to:

  • Modern C++, Build Systems, Debugging, and Cross-Platform Development
  • Memory Management, Cache Behavior, & Data-Oriented Design
  • OOP (Inheritance, Polymorphism, Composition, General Class Design)
  • Graphics Programming, GPU Architecture, Linear Algebra, and Advanced Geometry
  • ...
Features
  • OpenGL core renderer supporting full 3D, textures & materials, deferred shading w/ phong & PBR lighting, cont.
  • GLFW-based window and input handling
  • Basic event system providing easy observer / listener registration and hashed string-defined events & parameters
  • Data-oriented Entity-Component-System (ECS) architecture providing extensibility and cache optimization
  • Intuitive scene and resource systems built on inheritance-based 'item' hierarchy to permit easy GUI integration
  • ...

Building

Prerequisites
  • A C++ toolchain (clang, gcc, msvc).
  • CMake, which is available via installer on the official site, or via your OS package manager of choice:
    • macOS: brew install cmake
    • ubuntu/debian: sudo apt install cmake
    • fedora: sudo dnf install cmake
    • arch: sudo pacman -S cmake

Note: This project is currently developed on macOS. Windows is supported but MSVC compatibility is intermittent.

From Source (CMake)
  • Navigate to the project root.
  • Create a binary directory: mkdir build
  • Configure the source and binary directories for CMake: cmake -S . -B build
  • Build the project: cmake --build build
  • To run the resulting testbed 'sandbox' application packaged with the engine (a static library): ./build/examples/sandbox/sandbox
CLion
  • CMake is CLion's preferred build system for C++ and is fully supported. See their Quick CMake Tutorial.
  • (in progress)
Visual Studio Code
  • Install the C++ and CMake Tools extensions for VS Code.
  • Open project root and run the CMake: Configure command via the command palette (⇧⌘P).
  • After configuring, run the CMake: Build command.
Visual Studio
  • uninstall visual studio and use literally anything else (in progress)

Configuration

(in progress)

Usage

(in progress)

References & Acknowledgements

Materials

Repositories

Assets

License

This project is licensed under the MIT license.