Coder Social home page Coder Social logo

raineggplant / opengl-mingw-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 0.0 3 MB

boilerplate for OpenGL project with GLFW, GLAD, GLM, SOIL and FreeType on Windows with MinGW

CMake 51.63% C++ 48.37%
opengl glfw glad mingw cmake boilerplate vscode glm soil freetype

opengl-mingw-boilerplate's Introduction

OpenGL MinGW Boilerplate

This repository provides a boilerplate for OpenGL project with GLFW, GLAD, GLM, SOIL and FreeType on Windows with MinGW. It also provides a .vscode/c_cpp_properties.json file for VSCode.

Structure

This is the structure of the boilerplate.

.
├─.vscode
├─external
│  ├─freetype
│  │  ├─include
│  │  └─lib
│  ├─glad
│  │  ├─include
│  │  └─src
│  ├─glfw
│  │  ├─include
│  │  └─lib
│  ├─glm
│  │  └─glm
│  └─soil
│      ├─include
│      └─lib
└─src

Libraries

We will need GLAD, GLFW, GLM, SOIL and FreeType for our project. We have already placed GLFW (version 3.3.2), GLAD (verison 4.3) and GLM (version 0.9.9.8) files under the external folder. We have also re-compiled SOIL (version July 7, 2008) and compiled FreeType (version 2.10.2) using MinGW to fit our environment, and placed their files likewise.

If you want libraries of certain versions, you can still keep the structure of this project, and go here to download the pre-compiled binaries of GLFW, go here to generate GLAD source of your preferred version, go here to download GLM, and go here to download GLM.

Sources

You will need to place your own source files under the src folder. We have placed a simple file which will create a window.

Developing

We suggest using VSCode with C/C++ and CMake Tools extension so that you can build or debug simply by just clicking buttons in the status bar after proper configuration.

Of course you can also run:

# create build directory and move to it
mkdir build
cd build

# configure project
cmake -G"MSYS Makefiles" ../  # or "MinGW Makefiles" depending on your type of `make`

# build executables
make  # or `cmake --build ./`

The generated executable will be placed at build/bin .

opengl-mingw-boilerplate's People

Contributors

raineggplant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.