Skip to content

tim37021/CGHW2_2017

Repository files navigation

cghw2

Basic Rendering with Modern OpenGL

Build Instruction

This project needs five external libraries, glfw, glm, glew, tinyobjloader, lodepng. tinyobjloader and lodepng have been put into /ext directory. The remaining three need to be downloaded and built manually, since they are updated frequently. For following instruction, you will need cmake and git. Please install them before continuing.

Step 1: Download External Libraries

Simply go to their offical website and download the latest version.

Step 2: CMake

  1. At root directory of this repo. Make a new folder which has name start with "build". For example build_mingw or build_msvc

    # Don't copy me please...
    mkdir build_mingw
  2. Open cmake-gui and follow the steps in the figure.

This dialog wants you to choose an IDE(Compiler/Build Tool). You may want to choose "Unix Makefiles" in Linux-like or MacOSX. I normally use mingw-gcc and Visual Studio, so my selections are "MinGW Makefiles" and "Visual Studio 14 2015 Win64"

Step 3: Build & Run

After you press generate button, there will be a project file/makefile in the build folder. You can use IDE to open it(*.sln file) or use "make" to build. The following is the universal build command for different makefiles generators. This command can also be used to build Visual Studio project

cmake --build .

Note

  • If you want to add additional cpp files, simply re-cmake in build folder. It will adject Makefiles/Projectfiles autometically.
  • Well support for all platforms (Mac OS X, Linux, Windows) and IDEs/Compilers (xcode, codeblocks, visual studio).
  • Please don't copy and paste the commands I list here. Try to understand it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages