moji

moji

opengl cheet sheet

setup without sdl

install glfw:

˜ sudo apt-get install libglfw3 ˜ sudo apt-get install libglfw3-dev

install glad:

For glad1 generate and dowloand files here:

glad.dav1d.de/

For glad2 got to

gen.glad.sh/

In the API section, select gl version of at least 3.3, make sure the profile is set to Core, and that the Generate a loader option is ticked.

Ignore the extensions and click Generate to produce the resulting library

files.

copy the inclde files to /usr/include and the c file to your project directory

˜ sudo cp -R ./include/* /usr/include

make command linux for gflw and glad

˜ g++ -pthread -o test test.c glad.c -lglfw -lGLU -lGL -lXrandr -lXxf86vm -lXi ˜ -lXinerama -lX11 -lrt -ldl

or easier:

˜ g++ -o test test.c glad.c -lglfw -ldl