Giter Site home page Giter Site logo

celshading's Introduction

CelShading

Project to Render Scenes in Cel (Toon-like) Shading using OpenGL

Warning: This is a Work in Progress.

Building Notes (for Windows)

  • These notes are for building the project in Visual Studio Code. If using Visual Studio, the process is much simpler and you can follow the guides in the Learn OpenGL website.
    • The linked page only goes over installing and building GLFW and GLAD, but the tutorial series later describes similar procedures for GLM and Assimp too.
  • The compiler used is mingw-w64
    • Download the installer, not the zip file
    • Pick the latest version (8.1.0 at the time of this writing), x86_64 architecture, posix threads, seh exceptions, and build revision 0
      • Most of these should be the default, except for the architecture
    • Install mingw-w64 to a folder path with no spaces ("C:\Program Files" is NOT acceptable)
  • Use CMake to create the Makefiles to build the libraries and the project
    • Install the GUI as well to make things easier
    • [Reccommended] This can be skipped if using the VSCode CMake & CMake Tools Extensions, just make sure to add some settings to the settings.json in the .vscode folder to set the options for CMake
      • The procedure for using the CMake Tools Extension is to select a Kit (mingw-w64, labelled as GCC 8.1.0), select a Variant (Release or Debug), run CMake: Configure, and finally CMake: Build (this final step is not a part of CMake itself, and actuallly builds the project by running all Makefiles generated by CMake)
  • Install and Build the dependancy libraries
    • GLFW
      • If installing the source code, build the source with the default options set
      • Point CMake to where the GLFW root directory is stored (either via the VSCode extension or CMake GUI or adding -D args to running the cmake CLI)
    • GLAD
      • Select the latest version of the gl API (Version 4.6 at the time of this writing), Core Profile, and make sure that the "Generate a loader" box is checked
      • GLAD does not require the source to be built, just need tell CMake where the include directory and glad.c files are
      • Do this by pointing CMake to where the GLAD root directory is stored
    • GLM
      • Click on the Downloads tab on the right side, and download the latest version (0.9.9.8 as of this writing) from GitHub
      • GLM is an all-header library so no need to build anything, just need to tell CMake where the include directory is
      • Do this by pointing CMake to where the GLM root directory is stored
    • Assimp
      • Click on the link for the latest release (5.0.1 at the time of this writing) and download the source from GitHub
      • Assimp is required to be built and needs very specific CMake settings when using mingw-w64 as described here
        • -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DASSIMP_BUILD_ASSIMP_TOOLS:BOOL=OFF -DASSIMP_HEADERCHECK:BOOL=OFF -DASSIMP_OPT_BUILD_PACKAGES:BOOL=OFF -DSYSTEM_IRRXML:BOOL=OFF -DASSIMP_BUILD_SAMPLES:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DASSIMP_BUILD_TESTS:BOOL=OFF -S. -Bbuild_win
      • After building Assimp, point CMake to where the Assimp root directory is stored
  • Build the whole project and run it by running ./build/CelShading.exe at the project root directory!
    • Note that the exe file must be run from the project root directory, as this is the directory where the Resources/ folder is located in.

celshading's People

Contributors

dipeshmanandhar avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.