The EASIEST way to setup OpenGL with Visual Studio. (CMake Setup for Gamedev)
HTML-код
- Опубликовано: 29 окт 2024
- I have for you all the things you need to start writing OpenGL. It is difficult to configure libraries like GLFW GLAD GLM or IMGUI and that is why I already configured them for you. I used CMake to configure OpenGL but you don't have to learn it, just use my template. Thank me later.
#cpp #opengl #gameprogramming #graphicsprogramming #visualstudio #cmake
Followup video on using my setup to make your first game:
• Make your first C++ ga...
The first setup:
github.com/mee...
The second(bigger) setup:
github.com/mee...
Join my Discord server:
/ discord
Wishlist my game on Steam 💪:
store.steampow...
Check out my Cmake Video:
• The only CMake tutoria...
Check out my OpenGL guiding video:
• How you can start lear...
Check out my Game Dev in C++ video:
• If you want to learn h...
Do it a billion times then eventually you will just know how to do it...
Yeah kinda 😂😂 that is what I did and that is why I wanted to share my work with others
man, this is a godsend. You have no idea how many times I quitted C++ because of how much work i have to do just for setting up a stupid project, I hate how i have to spend so much time configuring instead of programming itself, and switched to Rust. However after coming to your channel you definitely helped me to stop hating it less, because you're helping to make the process much more painless.
I was having trouble with setting up GLFW, but then I found this. I absolutely love your channel, yet haven't thought to sub yet, so I just have. You are super underrated and I just wanted to show you some appreciation for your content! Tysm!!!
thank you too bro 💪💪
What?! I've been looking for just such a video all day
Always here to serve my community 💪
wow you made my work like 75% easier
I'm glad to hear that 💪
A kind of stupid question but wouldn't setting up this on my own make me improve? I mean I haven't even went through the process yet.
so the answer is complicated. So setting this things up is a part of learning cpp, not of learning opengl, so I recomand beginners to do this later, but yes yo do at some point, whenever you want to, need to learn how to setup cmake. And if you do so I recomand you to copy how I did it (type it yourself) and learn what I did because this is the best way to setup cmake that I have seen and other people don't do it like this for some reason 💪
@@lowlevelgamedev9330 your channel is the best for learning opengl dude, thanks for the help we all appreciate it
When I try to compile the Simple Example, it just crashes and gives me a long error code ...
hm I'll recheck it, can you send me the error on the discord server and tag me?
@@lowlevelgamedev9330
Sure! I'll do that in a few minutes
idk this might be correct but it isnt three different colour triangle its just one color. Is there something wrong with like the shader or something
Remember to have cmake installed in vsstudio components!
im not quite sure if i understand how you open a project using this. I have cloned the repo, but how do i create a new OpenGL file after running the program? Is OpenGL now implemented in VS, or do i need to open this repo every time I want to start a new project?
you clone this repo everytime you want a new opengl project and you add cpp and header files to it. This means that you will clone all of the dependences every time but disk space is not a problem nowadays and there are some advantages to having all your depndences locally in your project like the fact that you can change them update them modify them and also the fact that it is easy to send to others
@@lowlevelgamedev9330 i tried making a .cpp file in the repo (with some sample OpenGL code), saving the .txt file, and compiling the program, but i am met with dozens of errors. Does it matter where I place the .cpp file in the repo?
how to configure for glut?
Spent hours stuck on "the code execution cannot proceed because glfw3d.dll was not found," anyone have any leads? Thank you!
you have to add that dll in the same folder as your exe but I recomand you to link it statically, just use my setop for example
to clarify I'm talking about tje glfw32.dll file that should have come with the library download, just put that in the same folder as your exe file (or sollution dir if it still doesn't work)
Which project of yours is shown at 0:06? I like the feel of this one.
I don't have a video about that project, I talk about it very briefly at the end of my learn opengl video. It is my first 3D opengl project.
Unfortunately the video was really fast and it has alot of new informations on me that I didn't understand it :'(
How would i go about making this work for opengl 4.3?
it already works for opengl 4.3, maybe I didn't understand the question, if so leave a new comment so I can see it or tag me on discord 💪
@@lowlevelgamedev9330 oh ok. I thought it was version 3.3 for some reason. Good to know though, thank you
Nice! Are you planning to make a video on raytracing?
I don't have it planned but it would ne a nice topic, si it is possible.
doesnt work just like every other setup on youtube for open gl .. im beginning to think cmake openg gl and everything to do with it is just cursed so i just wont bother
what happened? can you provide some details on my discord so I can help you and improve the setup? tag me please on the youtube help channel on my discord so I can help you
The triangle is only red for me
i want to lean how to make games in c++ i know the basic(i watched a 6 hour long video, the bro code) and now i want to make game and game engine, please, can you send me some good video in the reply ?i am really motivated so can you please help me 😁
I would strongly recommand any video from Javidx9's youtube channel. Also check out the handmade hero series(it is quite long but you could watch the first videos). The video from my channel about called how to start gamedev in c++ (it is like my fourth video or something) is basically a compilation of the best resources that I know of. Also I have a special channel on my discord server called resources where I post links. Good luck I love seing motivated people 💪
Ok thank you a lot 🙏 I am so happy now your the best, I will join your discord
@@lowlevelgamedev9330 and wich video should i watch fron javidx?
@@silloo2072 ayo mr, whats up with your engine so far?
@@Maverick56912 i gave up, i can't install openGL all the tutorials doesn't work on my mac i am sorry and thanks for asking, if you have any tips i will be happy to continue.
Can I do this in visual studio code too?
yes, the process is less smooth tho. You need to install the c++ extensions so you can open cmake projects with vscode. For C++ dev I recomand visual studio if it is an option for you however.
i didn't understand anything... am i dumb or something
Nah it is not your fault don't worry. The point of the video is not to understand how the configuration works but rather to steal it and use it to quickly be able to start learning opengl and don't deal with configuring libraries and such
easy, dump vs and use premake
🤣
can you make this for c
For the simple opengl setup it should probably work for c with little trouble. Some libraries are c++ only and you can just remove those (like glm is probably the only one that has to be replaced with cglm). Remove the cmake command that sets the project to c++17 if there is any and replace the cpp file to a c one. Let me know if you run into trouble.