Giter Club home page Giter Club logo

opengl-boilerplate's Introduction

OpenGL C++ Boilerplate

A cross-platform boilerplate project for OpenGL using GLFW and GLEW in C++. Compilation is done with cmake.

I want to keep this project as simple as possible and is targetted to those who are learning modern OpenGL.

Cloning

The external/ folder contains all the external dependencies used, and they are tracked using git submodules. In order to compile the program, you should first clone the repository and then download the dependencies with git submodule init and git submodule update

Alternatively, you can achieve this with a one-liner as follows:

git clone [email protected]:andersonfreitas/opengl-boilerplate.git --recursive

Initializing GLEW

Before compiling, you should first generate the include/ folder for GLFW:

cd external/glew
make extensions

Build

mkdir build && cd build
cmake ..
make

Building with XCode

mkdir xcode && cd xcode
cmake -G "Xcode" ..

Then open the generated Project.xcodeproj project.

If you don't have CMake installed on your Mac, the easist way is to install is with Homebrew using brew install cmake

Building with Visual Studio

CMake comes with a diverse options of generators. Use the CMake GUI on Windows to automatically create a project solution based on this project.

Using a different dependency version

If you want to use a different version of any dependency tracked as a submodule, you just need to checkout the desired version in the repository:

cd external/my_dep
git checkout XXX
cd ..
git add external/my_dep
git commit -m "Using my_dep at branch/tag XXX"

Dependencies

opengl-boilerplate's People

Contributors

andersonfreitas avatar bagobor avatar nigels-com 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.