OpenGL setup: GLFW and GLAD in Visual Studio Code on macOS

preview_player
Показать описание
Contents of the video:
00:00 Intro
01:00 GLFW download and project setup
03:03 VS Code default build task configuration
06:46 Glad download

——————————————————————————————————————————————————
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: clang++ build active file",
"command": "/usr/bin/clang++",
"args": [
"-std=c++17",
"-fdiagnostics-color=always",
"-Wall",
"-g",
"-I${workspaceFolder}/dependencies/include",
"-L${workspaceFolder}/dependencies/library",
"${workspaceFolder}/*.cpp",
"${workspaceFolder}/glad.c",
"-o",
"${workspaceFolder}/app",
"-framework",
"OpenGL",
"-framework",
"Cocoa",
"-framework",
"IOKit",
"-framework",
"CoreVideo",
"-framework",
"CoreFoundation",
"-Wno-deprecated"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compiler: /usr/bin/clang++"
}
]
}
Рекомендации по теме
Комментарии
Автор

You have no idea how much this tutorial helped me. I was struggling to find a good tutorial for this EXACT thing and you did it perfectly and clearly.

magicman
Автор

Indian Programming Legend comes to save the day again...

idkwhatIshouldsayhere
Автор

As a person who uses VSCode on MacOs, this works perfectly! Thanks!!!

sungjuyea
Автор

thanks for the video. you fix in a 4 min what I was stuck in for the past 3 to 5 hours, keep the grease work

aninosspro
Автор

Great simple and easy tutorial. Thank you!

You can also change the file type to be glad.cpp as well to avoid adding the extra path to the args list

fullViewJay
Автор

Best one! Really help me figure out how to build OpenGL with vscode

aaaakko
Автор

I wanna say thank you! I would gone crazy trying to set up all without your video...thanks for sharing!

nunzioturtulici
Автор

Thanks so much, I finally understand what's going on with the JSON files 😂

sanjaygupta
Автор

Thank you so much, I was looking for a tutorial for like hours until I finally saw your video, and it is working, thanks once again!

somabencsik
Автор

It is so clear! Thank you so much!
I was waiting for it the whole year. Would you be teaching how to use VSC set up for 3D with shaders, where we add more separate files??
You made my day!

lolaueda
Автор

This is what I have been looking for ages, THANK!!

maxrathbone-boschis
Автор

You made the process so easy . Brilliant tutorial .

mr.mclovin
Автор

xcode wouldnt work. i tried everything 3 hours.
this at first didnt worked too until i double checked that i copied wrong folder. now it works!!! thank you very much!!

Vencedor
Автор

Worked perfectly in mac M1, thank you!

vante
Автор

Simple and straight to the point, thanks!

aomadeira
Автор

thanks a lot. you are doing god's work. exactly what I needed.

viggenzz
Автор

hi, I am having trouble getting the file to run using the first code, the error message I keep getting is:

~/main.cpp:1:10: fatal error: 'GLFW/glfw3.h' file not found
#include <GLFW/glfw3.h>

1 error generated.

Build finished with error(s).

any recommendations for how to solve? Thanks :)

stamponfloormagic
Автор

you made the entire process too easy. thanks buddy now i can bang my head in the wall

prashantshrestha
Автор

Great instructions - easy to follow.
Highly recommended!!!

sauravregmi
Автор

@rosxnb THANK YOU SO MUCH! I've been banging my head against the wall trying to figure this all out for WEEKS, since I dont have admin privileges on my school Macbook so I cant install libraries at root. I circumvented it by simply just having Homebrew on the desktop, and other than that, followed your tutorial exactly. I dont usually 'like' videos ( because I'm lazy & usually dont love the content on YT, but you earned it!. Thank you!

popcultureprogrammer