Skip to content

rwols/gintonic

Repository files navigation

gintonic

Welcome to gintonic! This is a personal render engine of me. The current render strategy is deferred rendering.

Before Building

OSX

Install the latest version of Xcode and brew. Then install boost and CMake with brew:

$ brew install boost
$ brew install cmake

Ubuntu (possibly also other Linux flavors)

Make sure have a modern compiler (modern GCC or modern clang). Install boost, cmake and git with your package manager.

Windows

Install the latest version of Visual Studio C++. Install the latest version of CMake. Install a fairly recent version of boost. Make sure you have a git client.

Cloning

Clone this repository recursively in order to clone all the submodules too:

$ git clone --recursive https://github.com/rwols/gintonic.git

Building

We use CMake in the most standard way possible, no surprises. That means that you should execute the following commands on the command line in order to build the project:

$ cd path/to/gintonic
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .

It's recommended to build with Ninja:

$ cmake .. -G "Ninja"

On Windows, the freetype library cannot be built as a shared library, so use the following command line invocation for CMake:

$ cmake .. -DBUILD_SHARED_LIBS=OFF

You can optionally build release versions (the default is Debug):

$ cmake .. -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release

Structure of This Project

In graphical form, the directory structure looks like this:

gintonic:
  - assets:
    - CMakeLists.txt
    - <more directories>
  - examples:
    - CMakeLists.txt
    - <cpp files, each of which is a separate example executable>
  - include:
    - CMakeLists.txt
    - cmake:
      - <Doxygen related files>
    - Foundation:
      - <header files>
    - Graphics:
      - GUI:
        - <header files, deprecated>
      - OpenGL:
        - <header files>
      - Shaders:
        - <glsl shader files>
      - <header files>
    - Math:
      - <header files>
    - <header files>
  - lib:
    - <third party git submodules live here>
    - CMakeLists.txt
    - <implementation files, mirrors the include directory structure>
  - test:
    - CMakeLists.txt
    - <various unit test cpp files>
  - tools:
    - <various subprojects for tools development>
  - CMakeLists.txt # The root cmake file.
  - README.md # <-- You are here.

Example Executables

The example executables are located in examples. Each .cpp file is a single example. When building has finished, and assuming the project was built in the build folder, the example executables are located in build/examples.

Roadmap

I'm currently in the process of refactoring a lot of code. Most notably, the Renderer object (located in include/Graphics/Renderer.hpp and lib/Graphics/Renderer.cpp) has become so large that it has become infeasible to move the project forward. Moreover, Entities are in the process of getting a facelift. The current implementation has a bunch of hard-coded pointers to component objects; this should just be a vector. Dynamic casting will then be handled via dynCast in include/Casting.hpp. Next, a general Asset system is needed to make this engine data-driven. Take a look at the issues page to see what is being worked on.