Skip to content

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

Notifications You must be signed in to change notification settings

RainEggplant/opengl-mingw-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 .

About

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

Topics

Resources

Stars

Watchers

Forks