Opening a window - Vulkan Game Engine Tutorial 01

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 185

  • @nap2439
    @nap2439 3 роки тому +60

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

  • @louiserabaud1326
    @louiserabaud1326 3 роки тому +25

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

  • @samuellaporte439
    @samuellaporte439 4 роки тому +54

    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

  • @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

  • @sourajyotibiswas3278
    @sourajyotibiswas3278 3 роки тому +8

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

  • @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++)

  • @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 ❤

  • @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.

  • @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!

  • @guitarvoicing
    @guitarvoicing Рік тому +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!

  • @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

  • @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

  • @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!

  • @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 🤦

  • @gvcallen
    @gvcallen 3 роки тому +1

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

  • @SparxableTunes
    @SparxableTunes 3 роки тому +1

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

  • @musicproductionbrauns2594
    @musicproductionbrauns2594 3 роки тому +4

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

    • @ianpan0102
      @ianpan0102 2 роки тому

      exactly what I thought.

  • @larsgregersen
    @larsgregersen 3 роки тому +2

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

  • @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.

  • @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.

  • @KamiSlayerz
    @KamiSlayerz 8 місяців тому

    Love the tutorials so far!

  • @mananbhardwaj3976
    @mananbhardwaj3976 Рік тому

    please continue this series

  • @Gunslinger962
    @Gunslinger962 3 роки тому +1

    This is what I was looking for!

  • @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.

  • @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

  • @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 :)

  • @kgnet8831
    @kgnet8831 Рік тому

    really nice tutorial and good pace👍

  • @bharathn1720
    @bharathn1720 2 роки тому +2

    Teaching Vulkan.
    That's very much great 😊👍

  • @-Deku7
    @-Deku7 2 роки тому

    i really apreciate your help with dowloanding this software

  • @justinnoor4915
    @justinnoor4915 3 роки тому +1

    Thank you for the excellent videos 👍

  • @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!

  • @Qwantopides
    @Qwantopides 10 місяців тому +1

    Thank you for this!

  • @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

  • @vladislavakm386
    @vladislavakm386 2 роки тому +1

    thanks you just blew my mind

  • @forgottenkathy5911
    @forgottenkathy5911 Рік тому +2

    instructions unclear, now the rain is entering my house

  • @krupt5995
    @krupt5995 2 роки тому

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

  • @mohammadalaaelghamry8010
    @mohammadalaaelghamry8010 Місяць тому

    Great resource. Thank you.

  • @belallbasha
    @belallbasha 2 роки тому +1

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

  • @time_to_play_007
    @time_to_play_007 4 роки тому +4

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

    • @razetqa
      @razetqa 2 місяці тому

      как ты собрался программировать если английский не знаешь?

  • @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 😁

  • @-Deku7
    @-Deku7 2 роки тому +1

    it worked! thank you so much!!

  • @ichigonixsun
    @ichigonixsun 4 місяці тому +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?

  • @JohnMarkIsaacMadison
    @JohnMarkIsaacMadison 3 роки тому +2

    Good stuff!

  • @flocela
    @flocela Рік тому

    Thanks! That was really helpful.

  • @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/

  • @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?

  • @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.

  • @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.

  • @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.

  • @victorbetini6204
    @victorbetini6204 2 роки тому +2

    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

  • @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^

  • @michadyla8769
    @michadyla8769 10 місяців тому

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

  • @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

  • @ИльдарБулатов-т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.

  • @bimDe2024
    @bimDe2024 2 роки тому +2

    Hats off

  • @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

  • @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

  • @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.

  • @skepta32
    @skepta32 10 місяців тому

    would u recommend vulkan ? or smth else ?

  • @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.

  • @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.

  • @VRixxo123
    @VRixxo123 9 місяців тому +1

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

    • @FREAKBAlT
      @FREAKBAlT 5 місяців тому

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

    • @ichigonixsun
      @ichigonixsun 4 місяці тому +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.

  • @RichieRussell23
    @RichieRussell23 12 днів тому

    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:
    ua-cam.com/video/d2jkALhm9EE/v-deo.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!

  • @gaming53wishmaster71
    @gaming53wishmaster71 2 роки тому

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

  • @HorsyPotter
    @HorsyPotter 2 роки тому

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

  • @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.

  • @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

  • @aeliusdawn
    @aeliusdawn 7 місяців тому +1

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

  • @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();

    • @razetqa
      @razetqa 2 місяці тому

      i am getting the same error with first app on cmake

  • @FPChris
    @FPChris 2 роки тому

    Is there any tutorials using C?

  • @gordureba
    @gordureba 2 роки тому

    Thanks!

  • @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

  • @khwajataha6024
    @khwajataha6024 Рік тому

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

  • @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 UA-cam).

    • @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!

  • @Basseloob
    @Basseloob 2 роки тому

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

  • @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 ? ..

  • @zaiscott
    @zaiscott 2 роки тому

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

    • @razetqa
      @razetqa 2 місяці тому

      the same as xcode

  • @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.

  • @leocomerford
    @leocomerford 2 роки тому

    The full series of tutorial videos: ua-cam.com/video/Y9U9IE0gVHA/v-deo.html

  • @VFusioN69
    @VFusioN69 Місяць тому

    can anybody help me setup on mac

  • @ausilliam
    @ausilliam 3 роки тому +2

    im in love with you

  • @randospawn7495
    @randospawn7495 7 місяців тому

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

  • @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.... : )

  • @sanketsbrush
    @sanketsbrush 4 місяці тому

    what is the meaning of lve ?

    • @Banaannaa
      @Banaannaa 2 місяці тому +1

      little vulkan engine

    • @sanketsbrush
      @sanketsbrush 2 місяці тому

      @@Banaannaa thanks 👍

  • @pwrmoses
    @pwrmoses Рік тому

    Seems pointless to use a wrapper in this case

  • @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!!

  • @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