Opening a window - Vulkan Game Engine Tutorial 01

Поделиться
HTML-код
  • Опубликовано: 13 дек 2024

Комментарии • 183

  • @nap2439
    @nap2439 3 года назад +60

    I'm so pumped!! Finally someone is doing vulkan tutorials! Thanks a lot!

  • @louiserabaud1326
    @louiserabaud1326 3 года назад +26

    I almost gave up on learning Vulkan until I found your videos. Thank you a lot :)

  • @sourajyotibiswas3278
    @sourajyotibiswas3278 3 года назад +8

    I've waited thousand years for something like this, thanks for this

  • @NDSno1
    @NDSno1 2 года назад +8

    This is the first series on Game Engine programming that is easy to follow, elaborate, and practical. This can serve as learning material, as well as a base for one's own engine, because of the implemetation of common and practical tools such as GLFW, Vulkan.
    Please keep on updating

  • @samuellaporte439
    @samuellaporte439 4 года назад +55

    I've just started to learn Vulkan. This is like the most instructive and simple tutorial I've seen on the subject. Thank you and keep up the good work

  • @the24throguecannon
    @the24throguecannon 2 года назад +17

    Summer starts soon, so I'm thinking of watching this series seriously. The best part about it so far in my opinion is that it seems to be all laid out and planned (4:15 - "Which we'll cover in around episode 10"!)
    One other thing I've just thought about is that the code hints + documentation are convenient to pause and read about as I watch (as one being unfamiliar with C++)

  • @Firestar-rm8df
    @Firestar-rm8df 3 года назад +11

    Dude! This is gold! I can't wait to watch the rest! I can actually follow what you are doing!

  • @dalegriffiths3628
    @dalegriffiths3628 3 года назад +6

    The really cool thing about this Brendan is that as a Mac user (and I love my mac) I was so frustrated to find that opengl is no longer an option due to Apple not supporting it. I have been looking into getting a windows pc to get into 3D stuff and then I find this Vulkan (that i hadn't heard of) and that it runs in Xcode. Perfect, thanks so much.

  • @thesynalice
    @thesynalice Год назад +6

    I absolutely love that you are using a modern C++ approach with RAII and stuff. The world really needs more people like you ❤

  • @guitarvoicing
    @guitarvoicing 2 года назад +1

    Incredibly fluent and break down very complex API setup in a very clear manner. Thank you again!

  • @dn275
    @dn275 10 месяцев назад

    I think I'm finally ready to start learning Vulkan. Thanks for making this series! I just finished this video and I'm excited to continue, really thank you for making these videos. It's an invaluable resource!

  • @kyonas6047
    @kyonas6047 2 года назад +7

    finally after a week or so I AM AT THIS STAGE- ik it probably took u guys 4 mins but it took me long to understand everything in ep 0-

    • @BrendanGalea
      @BrendanGalea  2 года назад +3

      ya vulkan/computer graphics in general is a complicated beast. It's definitely an industry that has advanced as quickly as it has due to passion. Takes a lot of patience and trial and error to learn. I've been learning for over a decade, and still have much to learn! Hopefully this series can be a helpful part on your journey :)

    • @kyonas6047
      @kyonas6047 2 года назад

      @@BrendanGalea man this month i kept jumping from a game engine to another but now i feel like most game engines at this time use opengl which is old and i been trying to make a complex game in both godot and unity but bending the engine around to fit my needs felt hard lol ig makin a game engine is the way to go good luck bro i am excited to see what both of us can come up with in the future

  • @thehobbyshop392
    @thehobbyshop392 3 года назад +3

    Your keyboard sounds are so satisfying!

    • @BrendanGalea
      @BrendanGalea  3 года назад

      Glad you like them! But I think by tutorial 2 I stopped including them 🤦

  • @romangeneral23
    @romangeneral23 3 года назад +3

    I love your videos. You opened up Vulkan for me.
    THANK YOU SO MUCH!!!!!!!!

    • @BrendanGalea
      @BrendanGalea  3 года назад

      I'm so glad they have been helpful!

  • @user-dh8oi2mk4f
    @user-dh8oi2mk4f 3 года назад +11

    4:00
    Don’t you mean “since we’re not using OpenGL”
    Great video btw, can’t wait to watch the other tutorials.

    • @BrendanGalea
      @BrendanGalea  3 года назад +2

      Hahaha whoops! I’m surprised nobody else has mentioned that

  • @SparxableTunes
    @SparxableTunes 3 года назад +1

    Thank you for all of this! I'm very excited to get all the way through your series.

  • @gvcallen
    @gvcallen 3 года назад +1

    Really excited for this series! Subscribed and keen to see what Vulkan is all about ;)

  • @larsgregersen
    @larsgregersen 3 года назад +2

    Great tutorial. Precise and clear on all aspects and at just the right pace. Thanks!

  • @musicproductionbrauns2594
    @musicproductionbrauns2594 3 года назад +4

    It also feels like learning well writen c++. nice

    • @ianpan0102
      @ianpan0102 2 года назад

      exactly what I thought.

  • @KamiSlayerz
    @KamiSlayerz 8 месяцев назад

    Love the tutorials so far!

  • @RichieRussell23
    @RichieRussell23 26 дней назад +1

    hey windows ppl, if you're having a hard time setting up Vulkan and can't get the window popping as showed in the beginning, this video helped me fixed the issue:
    ruclips.net/video/d2jkALhm9EE/видео.htmlsi=yZOyPcu_rfFqFzlQ
    - basically make sure you're using visual studio and NOT visual studio code. Yes, bummer, but hey that's life lol.
    - the guy goes pretty much in depth and also talks about relative and absolute linking (very important thing to know when doing Vulkan development)
    hope this helps!

  • @jakobkreft7797
    @jakobkreft7797 3 года назад +2

    I can't believe I kinda actually got it working after googling like 50 different errors :))

    • @BrendanGalea
      @BrendanGalea  3 года назад

      Glad you got it working!

    • @avatharbehemoth
      @avatharbehemoth 3 года назад

      @@BrendanGalea i see you made some changes in the reference code. at first i got 118 errors.
      among which "FirstApp" is not a member of lve, which you put in there. it should be "first_app". changed that... the error is gone.
      I really hope you check errrors before posting the vid. otherwise this is going to be another completely useless tutorial, because it no worky.

    • @BrendanGalea
      @BrendanGalea  3 года назад +1

      @@avatharbehemoth - I'm not sure to which part you are referring to, do you have a timestamp? first_app is the file name, but the classes name is FirstApp
      I do run all the code on windows (starting after tutorial 5), linux and macos before posting so it should be mostly free of errors, but any mistakes that do come up after posting I will make a pinned comment :)

    • @avatharbehemoth
      @avatharbehemoth 3 года назад

      @@BrendanGalea
      So at the end of the video when i tried to compile i had 118 errors.
      Some were mine where i forgot a "}", ")" a ";" or something. Others were far more challenging.
      After i fixed those i had 5 errors left
      I ended up changing the class name to "first_app" in first_app.cpp, hpp and main. in order to get it to work.
      Had some serious documentation to read, errors to google and the last error was probably the most challenging.
      Unhandled exception at 0x00051526 Access violation reading location 0x00000004/return glfwwindowshouldclose(window) unhandled exception.
      Since the window was a null pointer. and you wanted to return it as a boolean.

  • @guilhermedasilvavieira5427
    @guilhermedasilvavieira5427 3 года назад +1

    Thank you for sharing your knowledge, first contact with vulkan and loving it :)

  • @yuanperry3443
    @yuanperry3443 2 года назад +1

    very helpful and easy to understand compared to many others videos. Thank you for the perfect training.

  • @Gunslinger962
    @Gunslinger962 3 года назад +1

    This is what I was looking for!

  • @kgnet8831
    @kgnet8831 Год назад

    really nice tutorial and good pace👍

  • @sekaus9158
    @sekaus9158 2 года назад +1

    Okey, it is working for me now... thx for the help with the setup... : )

    • @BrendanGalea
      @BrendanGalea  2 года назад +1

      Sorry! When I first started this I felt uncomfortable recommending a particular setup. But I should probably get around to creating a video at least showing how to set things up as I have them

    • @sekaus9158
      @sekaus9158 2 года назад

      @@BrendanGalea Dont worry! It is fine I got thow it :)

  • @Qwantopides
    @Qwantopides 11 месяцев назад +1

    Thank you for this!

  • @vladislavakm386
    @vladislavakm386 2 года назад +1

    thanks you just blew my mind

  • @nyx1284
    @nyx1284 3 года назад +1

    7:32 the ultimate power: predicting an error before it even happens.

    • @BrendanGalea
      @BrendanGalea  3 года назад

      The only greater power: being able to write 1000+ lines of code, compile and run with no errors 😁

  • @mananbhardwaj3976
    @mananbhardwaj3976 Год назад

    please continue this series

  • @time_to_play_007
    @time_to_play_007 4 года назад +4

    Круто, жаль английский не знаю, но видимо материал достойный!

  • @bharathn1720
    @bharathn1720 2 года назад +2

    Teaching Vulkan.
    That's very much great 😊👍

  • @forgottenkathy5911
    @forgottenkathy5911 2 года назад +2

    instructions unclear, now the rain is entering my house

  • @adam051838
    @adam051838 2 года назад

    Definitely need to rewatch the videos again after following along the first time. Struggling to keep up with the typing and also listen to the explanations lmao

  • @ichigonixsun
    @ichigonixsun 5 месяцев назад +1

    0:53 I got the example program running on my computer on Linux and the empty window shows up. However, instead of having a solid gray background color, it "screenshots" whatever was beneath the window before it was created, as if the program had frozen. Was that supposed to happen?

  • @dalegriffiths3628
    @dalegriffiths3628 3 года назад +3

    It's cool that you've got a terminal window in Xcode, I'm using 12 and only seem to have a console but not terminal and the other stuff.

    • @BrendanGalea
      @BrendanGalea  3 года назад

      I’m using vscode! Xcode is great too but I like vscode because it is multi platform.

    • @dalegriffiths3628
      @dalegriffiths3628 3 года назад +1

      @@BrendanGalea that’s cool I thought viscose was just c# on Mac. Will check that out then. Suppose you just follow visual studio to set up project. Will give it a go

    • @BrendanGalea
      @BrendanGalea  3 года назад

      Actually for vscode follow the ubuntu set up. Visual studio (somewhat confusingly) is a different editor and only specific to windows.

  • @krupt5995
    @krupt5995 2 года назад

    You are such a unit man. These videos are so well made. Great job

  • @justinnoor4915
    @justinnoor4915 3 года назад +1

    Thank you for the excellent videos 👍

  • @mohammadalaaelghamry8010
    @mohammadalaaelghamry8010 Месяц назад

    Great resource. Thank you.

  • @diegofloor
    @diegofloor 11 дней назад

    Maybe the sources you used changed. But the previous video suggested going to the setup process describe in that site, and in the beginning of this video you mention we should all have already a main file ready to go. Seems like there is a gap between the two videos. The tutorial goes on to setup visual studio, you are using vscode, and the environment setup is considerably different.
    But I appreciate the tutorials nonetheless. Thanks for putting this here.

  • @-Deku7
    @-Deku7 2 года назад

    i really apreciate your help with dowloanding this software

  • @flocela
    @flocela Год назад

    Thanks! That was really helpful.

  • @belallbasha
    @belallbasha 2 года назад +1

    thanks for the help it help my every thing i need to install

  • @-Deku7
    @-Deku7 2 года назад +1

    it worked! thank you so much!!

  • @fab_81
    @fab_81 Год назад +1

    thanks for the tutorial, straight to the facts and no fancy writing, like KISS principle. Btw why are you using another class to initialize the first class constructor with static variables inside the second class? Would be simpler to just initialize the values inside the first class itself for the window

  • @JohnMarkIsaacMadison
    @JohnMarkIsaacMadison 3 года назад +2

    Good stuff!

  • @vikkokay
    @vikkokay 2 года назад +1

    Awesome video, when I try running the project the background of the window looks like a screenshot of the upper right of my screen, though I suspect thats a cinnamon desktop bug haha

    • @BrendanGalea
      @BrendanGalea  2 года назад +1

      ya i wouldn't worry about that at this point. It's just a quirk of how different operating systems handle the initial value for the window at this point. Once we start rendering it won't be an issue.

  • @PP-ss3zf
    @PP-ss3zf 4 месяца назад +1

    Thank you for this tutorial Brendan. I'm following this on Windows. In this video, when you ran the code before implementing run(), and nothing happened, something felt unintuitive about that, because we already wrote the code to initialise the window, so I was expecting the window to open. Well I tried running the code without the run() implementation, and found that for me, the window opens for a split second then closes. Here's my theory on this, please anyone correct me if I am wrong: I guess this is because the default nature of the GLFWwindow is to destruct after it has gone through a single polling cycle. Question: Does this mean we are recreating the window at a very fast rate to give the illusion of a single steady window? It makes me wonder about how the game loop is integrated within an already running while loop too. Thank you!

  • @AJ213Probably
    @AJ213Probably 2 года назад +1

    so tempted to do this in Rust, but I don't know Rust well so maybe I should focus on getting things working in C++ first lol

  • @marnowable
    @marnowable 2 года назад

    Don't believe but it really worked

  • @victorbetini6204
    @victorbetini6204 2 года назад +2

    Thank you!

  • @hbarudi
    @hbarudi 2 года назад +1

    GLFW and SDL libraries, any others, GLFW does it only work on computers, not phones, tablets, consoles, or any other devices? What about SDL or alternatives to use if I want to make sure my app/game can function on ANY device?

  • @ArmiaKhairy
    @ArmiaKhairy 2 года назад +1

    Hey, How did you do this in VSCode @ 04:18 when you drag-and-dropped the function onto the other one to fix it?

    • @BrendanGalea
      @BrendanGalea  2 года назад

      Oh that was just a quick double click to select the function name and then copy and paste

  • @bimDe2024
    @bimDe2024 2 года назад +2

    Hats off

  • @michadyla8769
    @michadyla8769 10 месяцев назад

    What code formatting tool are you using for you VS Code C++ projects?

  • @VRixxo123
    @VRixxo123 10 месяцев назад +1

    10 minutes to create a Window ? Yeah im good 😂 Unity is looking real good right now

    • @FREAKBAlT
      @FREAKBAlT 6 месяцев назад

      Well what were you thinking choosing vulkan? From the official vulkan programming guide “Vulkan is very verbose”.

    • @ichigonixsun
      @ichigonixsun 5 месяцев назад +1

      Vulkan is a low-level API used for 3D graphics and GPU computing.
      Vulkan is not a game engine (like Unity), widget toolkit, render engine, or otherwise.

  • @rogerdavies731
    @rogerdavies731 3 года назад +4

    This is a great set of tutorials, thanks Brendan! I've just completed this tutorial 01 and instead of a blank window mine is filled with a copy of what was underneath it when the window was created, as if it took a screenshot. Any idea what could be the cause?

    • @BrendanGalea
      @BrendanGalea  3 года назад +5

      Thanks! And I don’t think that is something to worry about. Might just be how your OS defaults the pixels and we haven’t cleared or drawn over them at this stage yet.

  • @AaronDGreen
    @AaronDGreen 3 года назад +3

    I've been working on the code in this tutorial for a couple days now, pretty new to c++. I have a few questions. 1. why does GLFWwindow* window; not need to be initialized? 2. in first_app.hpp why does LveWindow lveWindow (WIDTH, HEIGHT, "Hello Vulkan!" }; use {} instead of ()? Thanks for all the work you put in the series man, I'm a bit of a dumb ass though.

    • @BrendanGalea
      @BrendanGalea  3 года назад +4

      1. We initialize window in the constructor, so it doesn't need to be initialized immediately in the header.
      2. You could used (), {} initialization is just an alternative way to initialize things. For more details: www.learncpp.com/cpp-tutorial/variable-assignment-and-initialization/

  • @adam051838
    @adam051838 2 года назад +1

    4:00 Is that a speak-o (spoken typo)? You mention not wanting to create an OpenGL context, and then say since we're not using Vulkan

    • @BrendanGalea
      @BrendanGalea  2 года назад

      Haha yes! Surprised I didn’t notice that during editing

  • @hectorceballos9580
    @hectorceballos9580 3 года назад +4

    How did you set it up for Visual Studio Code? I see that the Vulkan Docs use Microsoft Visual Studio. It is probably more complicated in VS Code than VS I'm guessing. I was just curious because I use VS Code quite a lot. Thanks for the videos.

    • @BrendanGalea
      @BrendanGalea  3 года назад +2

      I’ve been using Linux and macOS. It should be possible to set things up on vsCode for windows, maybe with using cmake. Just getting the build settings right might take some time. It’s something I’ve been meaning to do

    • @hectorceballos9580
      @hectorceballos9580 3 года назад +1

      @@BrendanGalea Thanks for that. I'll try to use make, and I'll also do some more research on build settings.

    • @nap2439
      @nap2439 3 года назад +1

      @@BrendanGalea please do, you're only person I've found doing so on youtube, literally no useful tutorials from anyone else !

    • @rogerwinright2290
      @rogerwinright2290 3 года назад +2

      I've been meaning to set this up with VSCode on Windows. You just have to modify some json environment files in VsCode to let it know what include paths to add in, but otherwise, it should work just the same after pressing "Build"
      If I find any good tutorials, I'll post them here!

    • @ElZafro_
      @ElZafro_ 3 года назад

      @@rogerwinright2290 If you find anything please share, I've been doing the series using VS Community because I don't know how to include the libraries in VS Code.

  • @notuhc69
    @notuhc69 2 года назад +2

    What is .env file, because I've followed vulkans tutorial and there was no files such as .env or .env-example. Anyone know?

    • @BrendanGalea
      @BrendanGalea  2 года назад

      Just a configuration file that specifies the filepaths to locate libraries, object files, etc. the reason I use a .env file is that I don’t commit it to the GitHub so that when developing on different machines they can each specify their own filepaths.
      .env is just a common name for a file that is used to specify local environment information specific to the machine running the code and not meant to be shared. The .env_example is just used as a template for the env file to remember what the variable names are

    • @notuhc69
      @notuhc69 2 года назад

      @@BrendanGalea thanks

  • @hereticstanlyhalo6916
    @hereticstanlyhalo6916 3 года назад +2

    How did you get it so it doesn't show errors under the include statements for the glfw3, and the vec4?

    • @BrendanGalea
      @BrendanGalea  3 года назад

      does your code compile and open a window? What editor are you using?

    • @br4yd3
      @br4yd3 3 года назад

      @@BrendanGalea I have the same problem, I am using XCode.

    • @br4yd3
      @br4yd3 3 года назад

      Also, How did you get it to work in VSCode? I have been looking for a tutorial or documentation for the past week.

    • @BrendanGalea
      @BrendanGalea  3 года назад +2

      ​@@br4yd3 So for xcode follow the steps here vulkan-tutorial.com/Development_environment#page_MacOS, it can be tricky because if you miss a single step or your search paths are not exactly right then it won't work.
      I'm not exactly sure how I set up with vscode on a mac. I'm pretty sure I downloaded the macos vulkan sdk, and then just followed the tutorial for the Linux section but skipping over the "Vulkan Packages" section and started from installing GLFW. If you've already brew installed glfw and glm then I think you shouldn't sudo apt install them again. Just skip all the way to "Setting up a makefile project".
      Then in vscode, configure it as you would for any type of c/c++ dev, so you'll probably want to add the c/c++ intellisense extension. To get proper code completion working you will need probably need to create a c_cpp_properties.json file and make sure in the includePath you have the path to the location of the macOS vulkansdk.
      example: code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference

    • @br4yd3
      @br4yd3 3 года назад

      @@BrendanGalea
      g++ -std=c++17 -I. -I/home/Vulkan//include -o a.out main.cpp -L/home/Vulkan//lib `pkg-config --static --libs glfw3` -lvulkan
      /bin/sh: pkg-config: command not found
      In file included from main.cpp:2:
      /usr/local/include/GLFW/glfw3.h:111:12: fatal error:
      'vulkan/vulkan.h' file not found
      #include
      ^~~~~~~~~~~~~~~~~
      1 error generated.

  • @VoylinsLife
    @VoylinsLife 2 года назад +2

    Dumb question: I see that there is a lot of 3D stuff in the later videos, but could I also learn all the things necessary to use the knowledge for making a 2D stuff?
    I guess 2D is just 3D but without the Z coordinate, but I'm new to all of this. I will still go through all videos as I am interested in the process anyway, if it will be useful or not for my end goal :p

    • @BrendanGalea
      @BrendanGalea  2 года назад +2

      Yup! Rendering 2D will work just fine. For the most part you’d use all the same 3D stuff except you’d probably use an orthographic projection matrix instead of a perspective projection.
      I do plan on covering some 2D topics in the future as well such as sprite rendering.

    • @VoylinsLife
      @VoylinsLife 2 года назад

      @@BrendanGalea Thank you so much for replying! Looking forward to seeing those videos in the future ^o^

  • @gaming53wishmaster71
    @gaming53wishmaster71 2 года назад

    i dont have the .env files wear do i get them please and thanks
    im stuck with out them

  • @hmmmmmmmmmm123
    @hmmmmmmmmmm123 2 года назад

    Hey, I know I'm kinda late, but I've been following the tutorial and I've been getting VK_ERROR_NATIVE_WINDOW_IN_USE_KHR when creating the window surface, really don't know what is causing this since I dont have any other active swap chains, any help would be appreciated.

  • @ИльдарБулатов-т4х
    @ИльдарБулатов-т4х 3 года назад +1

    I have a question about the construction of your logical device. Why, when describing VkDeviceQueueCreatInfo, you also describe VkDeviceCreatInfo, the feeling is that you are creating two logical devices.

    • @BrendanGalea
      @BrendanGalea  3 года назад

      what's the timestamp for the part you are referring to? Only one logical device is being created. A device queue and device are different things. One device can have multiple device queues.

  • @skepta32
    @skepta32 10 месяцев назад

    would u recommend vulkan ? or smth else ?

  • @Levendo
    @Levendo 3 года назад +1

    Great tutorial! Something weird happened when I was following along. I got an undefined reference error in main.cpp when I initialized the app variable using curly braces. When I removed the curly braces, it compiled successfully. Next, I added the curly braces back in, and suddenly it didn't throw the error anymore. What happened??

    • @BrendanGalea
      @BrendanGalea  3 года назад +1

      That is strange. Did you get the error in just the ide or also when you compiled for the first time?
      Which ide are you using btw? And which compiler if you know? And also what version of c++. Make sure to be using c++17 or newer

    • @Levendo
      @Levendo 3 года назад

      @@BrendanGalea I used VS Code on pop os, and c++20 with gcc. I was using cmake btw. And I forgot to mention earlier: the error showed up on the line where I called app.run()

    • @BrendanGalea
      @BrendanGalea  3 года назад

      @@Levendo hmm ya im not sure. Let me know if it comes back. My best guess would be that maybe the IDE just wasn't detecting this include paths until after trying to build the project for the first time.

  • @aeliusdawn
    @aeliusdawn 7 месяцев назад +1

    4:00 "Since we've not using Vulkan" I assume you meant to say OpenGL?

  • @FPChris
    @FPChris 2 года назад

    Is there any tutorials using C?

  • @gordureba
    @gordureba 2 года назад

    Thanks!

  • @phraggers
    @phraggers 3 года назад +1

    Very cool. Confused about a couple of things: Why use a destructor for the window, if we don't have a window the application should surely close (and then we just let the OS clean up right?) also why use a std::string to pass the window title when glfw expects a char* (so you're converting char* into string then back into char* again with .c_str() ..) It's just that I see these practices shown in every c++ tutorial on youtube and they make no sense to me at all.

    • @BrendanGalea
      @BrendanGalea  3 года назад +2

      I think the reason most c++ tutorials use strings because they tend to be easier to work worth, (string concatenation, getting length, etc.) and whenever a c-style char * is required, they can easily be converted by using the c_str() function.
      The destructor for the window is just good programming practices. Even though when the window is closed the program is terminated, maybe that won't always be true. In the future we could add on support for multiple windows, and might forget that we didn't properly implement a destructor for the window and introduce a bug.
      In general, the behaviour of a single class should be complete and not implicitly rely on external behaviour of the rest of the program.

    • @phraggers
      @phraggers 3 года назад +1

      @@BrendanGalea I appreciate your reasoning, I just don't see when closing the window of our game wouldn't mean the program exits (I always just code that way, RAII and OOP paradigms just totally go against my logical reasoning I guess, but that's purely my personal preference!) (EDIT: oops, re-reading my comments they sound kind of argumentative, that wasn't my intent, I was just curious as to why so many people do things that way)

    • @BrendanGalea
      @BrendanGalea  3 года назад +1

      @@phraggers - aha no worries, didn't seem argumentative to me :)
      But ya the only example I can think of is if you have multiple windows in your engine, that can be opened/closed dynamically at runtime. Since one window may be closed, but other windows could still be open, the engine would keep running and we'd want that windows resources to be properly cleaned up.

  • @zaiscott
    @zaiscott 2 года назад

    How do I setup vulkan in vscode? I dont want to use Xcode.

  • @HorsyPotter
    @HorsyPotter 2 года назад

    I am very new with makefile stuff and I don't no how to use cmake

  • @theshortcut101
    @theshortcut101 3 года назад +1

    Hi Brendan, thank you for the great tutorial. I was wondering why am I getting this error? undefined reference to `lve::LveWindow::~LveWindow()'

    • @BrendanGalea
      @BrendanGalea  3 года назад +1

      Did you define the destructor in the window header at 2:52

    • @theshortcut101
      @theshortcut101 3 года назад

      @@BrendanGalea yes i wrote public:
      LveWindow(...)
      ~LveWindow();

  • @acidrain9924
    @acidrain9924 3 года назад +1

    I thought macOS doesn’t support vulkan natively then how are you doing this series on a mac?

    • @BrendanGalea
      @BrendanGalea  3 года назад

      There exists a runtime library called moltenVK that acts as a compatibility layer between vulkan and metal. This allows vulkan applications to run on macOS/iOS.
      However I haven’t looked into this in much detail so I don’t know if there’s a noticeable performance cost. So far all the tutorials are coded on a 2018 mbp

  • @nsa3967
    @nsa3967 3 года назад +1

    I get this error after I added the shouldClose(). while (**!lveWindow**->shouldClose()): Type name is not allowed (The **BOLD** is the part causing the error and I don't know how to underline in RUclips).

    • @BrendanGalea
      @BrendanGalea  3 года назад +1

      What's the error message? And I think it should be a dot and not an arrow since LveWindow isn't a pointer.
      So lveWindow.shouldClose()

    • @nsa3967
      @nsa3967 3 года назад

      @@BrendanGalea Thanks for the fast reply! The error message is "Type name is not allowed". I tried using a dot, but still got the exact same error message. I am using Visual Studio 2019.

    • @BrendanGalea
      @BrendanGalea  3 года назад

      @@nsa3967 That's really strange, because all we're doing is calling a function we declare from another class.
      You added the classname scope before the function name?
      So FirstApp::run() { ... } and not just run() {..}
      I'd recommend going through the code again to make sure you haven't missed anything, or go to the github repo and download the tutorial 1 code and see if that compiles.

    • @nsa3967
      @nsa3967 3 года назад +1

      @@BrendanGalea Yeah I've double checked and it seems like it's fine. I'm gonna compile it from your Github and let you know if it works. Thanks for the reply!

  • @khwajataha6024
    @khwajataha6024 Год назад

    the code works fine, but now window comes up. WHats the problem?

  • @vanderleijunior1461
    @vanderleijunior1461 2 года назад

    Hi your video is very nice
    But I'm having a very strange problem. In initWindow, the last line is simply ignored
    With GDB, I put two breakpoints, one at glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); and another on window = glfwCreateWindow(width, height, windowName.c_str(), nullptr, nullptr); and it just doesn't fall in the second
    It's more strange because using the setup code ran without problems

    • @vanderleijunior1461
      @vanderleijunior1461 2 года назад

      It's a wayland error. The error is about stealing focus. I prefer to ignore this error and develop on windows. I tried the ones from glfw's github but without success, if anyone knows the solution I would appreciate it

  • @leocomerford
    @leocomerford 2 года назад

    The full series of tutorial videos: ruclips.net/video/Y9U9IE0gVHA/видео.html

  • @sekaus9158
    @sekaus9158 3 года назад +1

    I CAN NOT LOAD MY CODE! I say: 'VkResult' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).

    • @BrendanGalea
      @BrendanGalea  3 года назад

      The enum class over enum warning can be safely ignored. That’s present because I used the c vulkan bindings opposed to the cpp vulkan headers.
      But other than that the code should work.

  • @vinayjangam627
    @vinayjangam627 9 месяцев назад +1

    hey there i have just started learning c++ i have learned all the basic stuff but i wonder where do you learn and come up with solutions with the coding like for instance you used the destructer in the code for window like where do you learn this advance level stuff from ? ..

  • @VFusioN69
    @VFusioN69 2 месяца назад

    can anybody help me setup on mac

  • @Basseloob
    @Basseloob 2 года назад

    thanks for the tutorial,,,, build succeed but the window is not opening

  • @sanketsbrush
    @sanketsbrush 4 месяца назад

    what is the meaning of lve ?

    • @Banaannaa
      @Banaannaa 2 месяца назад +1

      little vulkan engine

    • @sanketsbrush
      @sanketsbrush 2 месяца назад

      @@Banaannaa thanks 👍

  • @ausilliam
    @ausilliam 3 года назад +2

    im in love with you

  • @ullaskunder
    @ullaskunder 3 года назад +1

    Okk I started pulling my hair...😓 I'm using vs code and mingw done with adding lib and include files to mingw folder but not working....

    • @BrendanGalea
      @BrendanGalea  3 года назад +1

      Ya I wasn't able to get things working with vscode on windows. The last time I tried I ended up giving up and just setting up visual studio.
      I'll give vscode another shot now and see if I can figure it out and will let you know.

    • @ullaskunder
      @ullaskunder 3 года назад

      @@BrendanGalea that would be a big help...I trying as well ...this this mingw64

    • @BrendanGalea
      @BrendanGalea  3 года назад +2

      haha ok this took longer than I expected but I got with working :)
      This is the build command in the vscode power shell
      g++ -std=c++17 -I. -IX:\VulkanSDK\1.2.154.1\Include -IX:\dev\Libraries\glm -IX:\dev\Libraries\glfw-3.3.2.bin.WIN64\include -o main.exe *.cpp -LX:\dev\Libraries\glfw-3.3.2.bin.WIN64\lib-mingw-w64 -LX:\VulkanSDK\1.2.154.1\Lib -lglfw3 -lvulkan-1 -lgdi32 -static-libgcc -static-libstdc++
      You will have to update the filepaths of course based on where you have stuff saved
      The last two flags -static-libgcc -static-libstdc++ may be unnecessary, I think I was having some issues because I had mingw32 installed elsewhere on my computer which was causing conflicts.
      Make sure to update your Path system environment variable to in include wherever your ../mingw64/bin is
      After updating Path make sure to close and reopen vscode, I got caught up on that for a bit.
      This is a good guide for configuring some stuff in vscode and going over how to update Path. code.visualstudio.com/docs/languages/cpp
      If you have any questions I'll answer them as soon as I can but I may not be able to get to them until tomorrow!

    • @ullaskunder
      @ullaskunder 3 года назад +1

      @@BrendanGalea Awesome.....😮yesterday I did something stupid, today I'm going to try your method.....thanks a lot.... : )

  • @randospawn7495
    @randospawn7495 7 месяцев назад

    Making a vulkan game engine by myself just wanted to see how to link it lol

  • @possiblyblue2494
    @possiblyblue2494 2 года назад +1

    Hey Brendan, I am using C++ ISO 20 and VS2019 IDE but there are 35 errors, I want to send them to you so you can help me

    • @BrendanGalea
      @BrendanGalea  2 года назад

      My first guess would be something to do with the dependencies (glm, vulkan, glfw) not getting properly included.
      But you can join the discord and share them in the debugging_help group and I'll see if I can help resolve the errors - discord.gg/CUQkuKsszr

  • @shyne2643
    @shyne2643 3 года назад +1

    Developement environement tutorial doesn't work.

    • @BrendanGalea
      @BrendanGalea  3 года назад

      Which environment are you using. Maybe I can help

    • @shyne2643
      @shyne2643 3 года назад +1

      @@BrendanGalea i'm using VSC on win10, i installed MinGW using MSYS2, and i'm using a makefile like shown in the linux part of the tutorial (i saw you were using one so i decided to follow along), however the $(LDFLAGS) thing doesn't work and g++ outputs that it couldn't find every single of those flags

    • @BrendanGalea
      @BrendanGalea  3 года назад +1

      Ya the makefile I provided would only work for linux or macOS. It was a bit tricky but this is what I came up with, I tested it on win10 and it seems to work.
      Makefile
      -------------------------------------
      include .env
      ifeq ($(OS),Windows_NT)
      RM = del /Q /F
      CP = copy /Y
      ifdef ComSpec
      SHELL := $(ComSpec)
      endif
      ifdef COMSPEC
      SHELL := $(COMSPEC)
      endif
      else
      RM = rm -rf
      CP = cp -f
      endif
      CFLAGS = -std=c++17 -I. -I${VULKAN_SDK_PATH_INCLUDE} -I${GLM_INCLUDE} -I${GLFW_INCLUDE}
      LDFLAGS = -L${GLFW_LIB} -L${VULKAN_SDK_PATH_LIB} -lglfw3 -lvulkan-1 -lgdi32
      TARGET = main.exe
      ${TARGET}: main.cpp
      g++ $(CFLAGS) -o ${TARGET} main.cpp $(LDFLAGS)
      .PHONY: test clean
      test: ${TARGET}
      .\${TARGET}
      clean:
      ${RM} .\${TARGET}
      .env file
      ---------------------------------------
      VULKAN_SDK_PATH_INCLUDE = X:\VulkanSDK\1.2.154.1\Include
      VULKAN_SDK_PATH_LIB = X:\VulkanSDK\1.2.154.1\Lib
      GLM_INCLUDE = X:\dev\Libraries\glm
      GLFW_INCLUDE = X:\dev\Libraries\glfw-3.3.2.bin.WIN64\include
      GLFW_LIB = X:\dev\Libraries\glfw-3.3.2.bin.WIN64\lib-mingw-w64
      And then to run the makefile, in windows powershell within the project directory I ran
      C:\MinGW\bin\mingw32-make.exe
      Let me know if that works for you!!

  • @pwrmoses
    @pwrmoses Год назад

    Seems pointless to use a wrapper in this case

  • @platin2148
    @platin2148 3 года назад +1

    Hmm i dunno but i prefer to not include template monsters like glm. Also the Entire OOP trash is not really what i like. Wtf why did you wrap the glfw window when you never create a native window anyways. Also even more important why did you start with abstractions before you even knew the usage code or made some usage code.

    • @BrendanGalea
      @BrendanGalea  3 года назад +2

      Yes that's a good point! They can slow compile time and I don't believe you would see glm being in completed engines. But for when learning I think it's a very easy to use and understand vector library. But of course feel free to use your vector library of choice, or you could even create your own!
      I think your confusion may be from me not communicating well enough what this series is.
      My aim for this series is to create a more beginner friendly 3d graphics/game engine using the vulkan api and not the most optimized engine. So I have a lot of focus on theory and many concepts that if you've worked with other graphics APIs you may already know.
      So for as far as design decisions go, I'm always trying to balance being clear and educational, but also concise and trying to minimize backtracking, and then the lowest priority for now is on being optimal. (And then of course I may also make a mistake!)
      I will be using lots of OOP so you may not like this series though! But vulkan is a fantastic C API so there is absolutely no reason that if you want to use vulkan that you'd be stuck using OOP, that was just my choice. I'm sure someone else has or will create a vulkan series not using it.

    • @BrendanGalea
      @BrendanGalea  3 года назад +2

      @GigaramsYT Thank you for the feedback, this is my first time creating a series of tutorials so there has been a pretty big learning curve! I agree that I didn't give an adequate explanation of what a window is and why I was creating an abstraction for it.
      And for namespaces I also should've communicated my intention and why I've been wrapping all the code. It's because I intended this to also work as a library and therefore I wanted to avoid potential naming conflicts, but in hindsight this was probably a mistake for this tutorial series... oh well I'm kind of stuck doing it now.
      If you want to follow the series, leaving out the namespace shouldn't affect things though. Once the series is over I'll have to make a video going over all the things I should've done differently :p
      Anyway I really appreciate the feedback!

  • @physixtential
    @physixtential 3 года назад +2

    Man I was excited about this series, but using namespaces trashes my comprehension of code. I think it is especially a mistake to use them when teaching, because the learner is blinded to the structure of the code.

    • @BrendanGalea
      @BrendanGalea  3 года назад +3

      I had never considered that, but I'm not sure I fully understand what you mean. Doesn't the use of namespaces make the structure of the code more clear?
      Or do you mean for example, using namespace std; ? Because I won't be doing that in the series because it can potentially result in naming collisions, pollutes the global namespace, and that does make the structure of the code more difficult to understand.

  • @KronenR
    @KronenR 2 года назад +1

    Vulkan is not a game engine, it's an API

    • @BrendanGalea
      @BrendanGalea  2 года назад +2

      you are absolutely correct! If I said it's a game engine in the video that's incorrect. The tutorial series is on how to make a game engine using vulkan

  • @codeking4585
    @codeking4585 2 года назад

    man your video is good but for tutorial your codes are very hard to understand ,i use SDL2 for window creation it should be easy for me but i found your videos are not good for tutorial ,you should use simple codes to do it if you are making a tutorial

  • @z0mbiebanana9891
    @z0mbiebanana9891 2 года назад

    #GLFW_INCLUDE_VULKAN apprently is an "invalid preprocessing directive" for me. Looking around and found out it is just a directory to the vulkan.h file, so if you go to the path to your include files, and then vulkan/vulkan.h. I think this was something I've messed up in the setup so I will proberbly go back but just if anyone wants to quickly see if their code works.

    • @SimoneN64
      @SimoneN64 2 года назад +1

      Because you're supposed to do #define GLFW_INCLUDE_VULKAN, not #GLFW_INCLUDE_VULKAN