fguilhermepll / opengl_glad_glfw_boilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building with GLFW3 and GLAD

This is my own annotations for running a build with OpenGL, GLFW and GLAD depedencies on linux.

Installation

Paste the following set of steps to set up GLFW in your environment. (in my case I'm using arch linux)

version="3.2.1" && \
wget "https://github.com/glfw/glfw/releases/download/${version}/glfw-${version}.zip" && \
unzip glfw-${version}.zip && \
cd glfw-${version} && \
sudo pacman -S cmake xorg-dev libglu1-mesa-dev && \
sudo cmake -G "Unix Makefiles" && \
sudo make && \
sudo make install
(although running sudo make install isn't appropriate, will do it for now until I find something that works better)

Setting up GLAD:

Download binaries and dependencies on their website: GLAD

Usage

g++ -std=c++11 -c main.cpp -Iglad/include && \
g++ main.o glad.c -o main.exec -lGL -lGLU -lglfw3 -lX11 -lXxf86vm -lXrandr -lpthread -lXi -ldl -lXinerama -lXcursor

License

MIT

About


Languages

Language:C++ 100.0%