Basic environment to make OpenGL works on MacOS with Cmake( in VSCode )
-
Firstly, you should download GLFW/glad files and put them in your system include/ and lib/ folder. ( /usr/local/... ) Reference
-
If you use VSCode, you should first download the Extension:
C/C++ Entension Pack / CMake / CMake Tools / CMake Integration / CodeLLDB
-
After doing those, just clone this repo, and open it. Run it on Terminal like this below:
mkdir build cd build cmake .. && make ./opengl_test
-
Then, you can draw two triangles on your windows.