I just found this, and this is quite a gem; please continue on your series, don't feel disappointed by the lack of viewers/comments/subscribers yet. This is quite a niche topic, but considering how clear your instructions are, eventually you'll get there.
@BrendanGalea4 жыл бұрын
Thank you, much appreciated!
@crimsonalucard4 жыл бұрын
Nah he's just starting out, once he has more content the views will go up. He just needs to stick with it.
@j_respect59483 жыл бұрын
@@BrendanGalea i was actually looking for opengl but i found vulcan, should i choose vulcan over opengl? But most ide supports opengl
@BrendanGalea3 жыл бұрын
@@j_respect5948 - It depends. There are many more tutorials out there for openGL so it can be easier to learn. It is also less verbose, so getting started with it is easier. If you are already very comfortable programming in c++ then I think either vulkan or openGL are good options, with vulkan being slightly harder. If you're still learning c++ I would recommend learning a bit of openGL first as trying to learn a hard language like c++ and a complicated api like vulkan at the same time is too much to do at once.
@mili11224488163 ай бұрын
Just came here to say - it's been 3 years and this comment has now proven to be right :) congrats on your views and subscribers!
@valentinzacarias76733 жыл бұрын
I cant belive this content is free, this series are amazing, thanks for this, and for making internet a better place.
@BrendanGalea3 жыл бұрын
Thank you, that means a lot to me!
@Vengiism3 жыл бұрын
Amazing stuff Hold this sub
@sethmoore5903 Жыл бұрын
For windows machines that have installed the 64 bit version of Vulkan (only checked version 1.3.268.0), the "glslc.exe" executable mentioned @12:27 can be found in within the Bin folder, rather than Bin32.
@Mohammed_Developer17 күн бұрын
like me
@ElZafro_3 жыл бұрын
Hey, I've just discovered this channel after some weeks trying to learn Vulkan by myself. It's mind-blowing how difficult topics finally click as you explain it. Thanks so much for the series!
@BrendanGalea3 жыл бұрын
Thank you!! Glad you’re enjoying the series so far
@ozgurpeynirci45863 жыл бұрын
This is an extremely beautiful series of tutorials.
@BrendanGalea3 жыл бұрын
Thank you!
@redsteph3 жыл бұрын
This is awesome!! Please please please do not feel discouraged, you're helping a lot of people. Thank you soo so much!
@BrendanGalea3 жыл бұрын
Thank you so much. These videos do take for me a lot of time and effort so it is really great to hear that there are people out there that find them helpful!
@jamesrivettcarnac3 жыл бұрын
This is the clearest series I've seen.
@Juan-jc6oc3 жыл бұрын
Wow! I had never compiled shaders for SPIR-V, and following the tutorial on that page, it became cumbersome and eternal to read, about the validation layers. But here, much progress was made. Thank you!
@lucaaaa6382 Жыл бұрын
Thanks a lot for the tutorials!!! I know this video is 2 years old but it really has no age from the perspective of it's usefulness. I am grateful that you and other people like you educate us so much and I myself learned so much from you tube only. As far as I'm concerned if schools had teachers like you I would love to be there.
@pchpchpch4 жыл бұрын
Thank you for the tutorial series! This is really good stuff. You're easy to understand, concise, and informative. Keep it up!
@stanleywinata99222 жыл бұрын
I don't usually comment on youtube videos, but you are a godsent! your tutorial is awesome and super helpful! Especially since there isn't much easy to follow/understand vulkan tutorials and guides out there.
@cnsujeer3 жыл бұрын
Finally, something that beginners (like me) can understand. Thanks mate!
@mavoort9628 күн бұрын
Great tutorial so far. I especially like the fact that you're using modern C++ and wrap everything in a class, so a lot of boilerplate code is hidden in the constructor/destructor. An easier way to obtain the filesize in 17:10 is to use the header in C++17: std::filesystem::file_size(path) Also, the file is automatically closed when it goes out of scope, so there is no need to close it manually.
@williamwherewhatwho61772 жыл бұрын
I don't know anything about shaders but still enjoy learning about advanced topics such as this. You had a good tempo in the video and explained everything clearly. GJ
@StarContract3 жыл бұрын
The best Vulkan series, absolute mad lad
@BrendanGalea3 жыл бұрын
Thank you :) it’s definitely not perfect so I’d recommend not using this as your sole resource. But I think it acts as a pretty good way to get started, especially if you prefer the video format for learning
@damiengates75812 жыл бұрын
@@BrendanGalea the way you lay out the pipeline is so concise that this is probably the best place to start
@jordifrias88292 ай бұрын
I am learning Vulkan thanks to you. Thanks a lot! Really really nice series.
@phannguyenthanhtung86003 жыл бұрын
the greatest graphic pipeline guide i've ever seen!
@VoylinsLife2 жыл бұрын
Really gives a good view on the subject. There are parts that I didn't know how they worked, because my knowledge of c++ is still quite new. But with a little bit of looking up I figured out how those work. Thank you!
@salieridr97309 ай бұрын
I love your tutorials! I am following the official Vulakn Tutorials but I think it is hard for me to understand how it works. Your explanation is very clear!
@AmaanHasanDilawar2 жыл бұрын
This what I was looking for years...Thank you ♥♥
@dedem1th2 жыл бұрын
How this content is free!! can't believe it, hope you stay healthy
@tylersage47503 ай бұрын
I just discovered this channel and i finally got through episode 0 and 1 over two days. I haven't programmed anything in 6 years. Kinda rusty on the fundamentals, but i think im following along okay sofar. Definitely gonna need to study the basics of c++ while im doing this series.
@kensclark Жыл бұрын
I'm loving your tutorials! I followed the complete LunarG tutorial, however, it adds everything into one class which makes it over 1.5k lines of code to search through which makes things hard. Even though I am at an intermediate level of C++, I found it hard to put things into classes. You make it extremely easy! Thank you!
@victornas913 жыл бұрын
Just thank you for your service and product quality!
@mesofreak4 жыл бұрын
hey i just found this video, the tutorials are extremely helpful! Thank you for putting effort into the documentation and timestamps!
@brohogany99203 жыл бұрын
Half way to drawing our first triangle you say. This is going faster than I thought!
@ietsization3 жыл бұрын
Thanks for making these! :) Just got done with the triangle tutorial but this definitely helps to understand it better
@Adam-vt8ej3 жыл бұрын
Best tutorial on KZbin!!! What is this IDE used during this tutorial?
@BrendanGalea3 жыл бұрын
VS code. I really like it!
@victornigel73673 жыл бұрын
Thank you very much for the Tutorials! You are very good at explaining!
@goncalosoares84833 жыл бұрын
These videos are amazing, good job and keep up the good work.
@Yusufbek-gp2qp5 ай бұрын
This is a gem! Thank you
@AntoineViallonDevelloper4 жыл бұрын
Subscribed. Extremely promissing channel.
@may80492 жыл бұрын
and at that moment, he knew, he just f.... ........ound a legendary channel.
@dmitrykolesnikovich4 жыл бұрын
Great explanation, thanks for sharing your ecpirience with all of us
@dclxviclan2 жыл бұрын
Academic style, i love this
@m3taldragon111 ай бұрын
The fact that you did all this without CMake is amazing... I would've automated things like shader compilation from the start
@abarry60023 жыл бұрын
love the series so far! already went through the vulkan tutorial website and I also really like that but I wanted to go over a video tutorial to get some different perspectives on the layout and following so far I've actually made some changes to my programming style and text editor (not completely related to the tutorial) i decided to change my brackets to be on the same line, I went from const type to type const because I think that is more direct and I switched from the itai theme to the rose-pine theme in nvim :)
@damondouglas Жыл бұрын
Thank you for making these videos.
@BinaryAgent663 жыл бұрын
Agreed. Just found this. Very well put together. Keep going! Please :)
@BrendanGalea3 жыл бұрын
Thank you! More to come!
@Antimony-ing Жыл бұрын
Underatted 💯%
@aydnbilgin16272 жыл бұрын
Thanks dude...It helps alot especially on beginners like
@eranze4 жыл бұрын
Amazing tutorial, thank you!
@cprn. Жыл бұрын
Please, if you ever find time, make an extra video about differences between your Makefile and the one we get after following vulkantutorial website, e.g. `pkg-config` for `glfw3` returns more libraries than the website suggests and I see you prefer it for some reason. I'd love to get more fluent in C++ (and Makefiles) and this seems like a very fun project but my compilation skills s*ck as*. Everything works so far but idk why which is the worst kind of unknown. I love the way you explain sh*t. 🖤
@dalethepalemale68553 жыл бұрын
On arch linux, the glslc file is included in the "shaderc" package
@VoylinsLife2 жыл бұрын
Thank you!!
@dalegriffiths36283 жыл бұрын
Great videos, love your clear presentation style - Brendan do you mind me asking your background?, you are so knowledgeable!
@BrendanGalea3 жыл бұрын
Not at all! I've always had a strong interest in computer graphics since I first started coding at around 15. I did a BSc and MSc in computer science.For my masters I was in a computer graphics and animation lab and was a teachers assistant for some grad level graphics and animation courses. Then I've also followed a lot of youtube tutorials for opengl. Following school I spent a couple years at facebook and then worked at a iot device startup for a couple years after that, and just trying to figure out what to do next now. I was working on building affordable motion capture cameras when I needed to make a gui for it and rather than use opengl I figured I could learn vulkan. However I was kind of surprised nobody had created a beginner friendly vulkan series yet. Without my background in computer graphics I knew there wasn't any chance I would've been able to learn vulkan using the existing stuff out there. So I started working on this series in hopes to help with that.
@lilakouparouko18323 жыл бұрын
I had some problem for compiling to the .spv format because my glslc.exe path had spaces in it. Puting quotations marks (these things : ") around the path solved the issue. I thought I'd put that there if anyone has the same problem. By the way thanks a lot for these tutorials, your explanations are great !
@BrendanGalea3 жыл бұрын
Thank you!
@albinadolfsson2963 жыл бұрын
Helped me, thanks :)
@FlyMandiАй бұрын
For you windows folks' getting the exception thrown, you might want to try setting absolute paths at 19:33. Windows and relative paths that aren't environment variables can very easily cause trouble.
@KesoDev4 күн бұрын
you are the absolute goat
@dawid44502 жыл бұрын
Maybe it will have someone but make sure that your files for shaders are encoded in UTF-8 without BOM, glslc wont be able to parse them correctly with BOM, rider added BOM automatically and it was quite hard to realize what the problem was when compiling the shaders
@igd15913 жыл бұрын
I've got an error: simple_shader.vert:3: *error: '' : syntax error, unexpected LEFT_BRACE, expecting LEFT_PAREN 1 error generated.* So I had to change the array declaration syntax to this: vec2 poistions[3] = vec2[] ( vec2(0.0, -0.5), vec2(0.5, 0.5), vec2(0.0, -0.5) ); after that the error disappeared, still syntax looks quite weird.
@BrendanGalea3 жыл бұрын
Yep shaders are programmed in glsl. It is a language that is similar to c but there are some differences.
@igd15913 жыл бұрын
@@BrendanGalea Sorry, my fault. I was watching late and it seemed you wrote curly braces.
@RemyDrijkoningen4 жыл бұрын
Hi there, just discovering those tutorials and although all those things are hidden and "automatically handled" by higher level engine, i'm delighted to learn what's happening under the hood and all the work that is put for me everytime i totally fail to optimize anything :D I'm also curious about what software(s) you use to make your "handwritten" blackboard slides? That format is very comfortable to follow
@BrendanGalea4 жыл бұрын
I draw them using procreate on an iPad, and then transitions are edited in DaVinci resolve
@jahjae2 жыл бұрын
Thank for sharing the idea
@zbl25502 жыл бұрын
excellent video, benefit a lot
@affepaffe4202 жыл бұрын
Hello! Thank you for you amazing tutorials. I have an error, when i run my code i get an exception from "vector" that says "Microsoft C++ exception: std::length_error at memory location 0x000000CD9B90EA80." my code looks exactly like yours but it still dosent work. Do you have any idea of what i could be doing wrong? (my guess is thata there is something wrong with my pipeline readfile function)
@gabrieldowling665511 ай бұрын
For those struggling to find the glslc compiler in the Vulkan SDK's Bin32 directory on windows: For the modern 64 bit release of the Vulkan SDK (as of Feb. 2024), glslc is contained in the "Bin" directory rather than the "Bin32" directory.
@appletime1012 жыл бұрын
when creating the function readFile at ~14:40 why do you choose to return a vector of chars instead of a string, and then use the string constructor that takes a start and end forward iterator once the file is successfully opened?
@NavjotSingh-dy4iu Жыл бұрын
Thank you!!
@immanuelc8853 жыл бұрын
Thanks for making good tutorials! btw is there any difference between .hpp files and .h files?
@BrendanGalea3 жыл бұрын
Thanks! And no not really. If you prefer using .h you can use that and it won’t affect the tutorial.
@jan-u7g4rАй бұрын
in windows you can directly call it since it's already in the env variable
@Fidelity_Investments3 жыл бұрын
god this man moves fast
@BrendanGalea3 жыл бұрын
sorry! is it too fast? I tend to cut out any pauses to keep the video flowing with the intention that people would pause as they follow along while coding.
@Fidelity_Investments3 жыл бұрын
@@BrendanGalea I'm sure it's fine for more experienced users but I'm relatively new to c++. Coming from years of backend web dev. A lot of this is just way too fast for me and goes a mile over my head. I'm trying to find someone to help me understand this tutorial more.
@BrendanGalea3 жыл бұрын
@@Fidelity_Investments Ok! Ya I have mostly just focused on explaining the vulkan specifics, and only explain certain aspects of c++ occasionally . There are plenty of great resources for learning c++, I really like www.learncpp.com It's long, but many parts can be skimmed on a first read through and then looked up when you come across that functionality.
@federicotorres622711 ай бұрын
if you executing from Xcode, you probably need to change the working directory in Xcode settings (Edit scheme -> run -> options) or set absolute paths to the shader files
@evelyn.exe_2 жыл бұрын
I followed the tutorial but when running the program I get the error “failed to open file: shaders/simple_shader.vert.spv”.
@BrendanGalea2 жыл бұрын
Could be a path issue. Try using the full path (c:/documents/…/shaders/simple_shader_vert.spv) instead of the relative path for when reading the file
@evelyn.exe_2 жыл бұрын
@@BrendanGalea that worked thanks!
@mexicano1891 Жыл бұрын
You say full path is place the full path and after -o full path again but executable. I don't undestend?
@meowmeowcatcat85 ай бұрын
If anyone runs into the issue and is in an IDE, I found a solution that worked for me. IDEs compile and send the .exe to a specific folder. Your path must be relative to that location. For Visual Studio, check the project properties by right-clicking the project in the solution explorer and click Properties. From there, go under Configuration Properties and General. Look at the path in Output Directory. That is where the .exe goes and thus it is the path from which the shader path is relative.
@lelomizuki52513 ай бұрын
@@meowmeowcatcat8 Hello, I read your comment 10 times and I still don't understand it, could you be a little more specific in the final part? Should I put the .exe in that folder or should I configure the folder to run from where the video explains?
@yaircambordamorocho45063 жыл бұрын
Greetings again! I have been progressing on my own and I have already come to implement the buffers (I am trying to guide myself from the structure you have in your github), and I am starting with the depth buffer, but it seems that you have already included it in the files of the exchange chain?
@BrendanGalea3 жыл бұрын
Yes the swap chain file class provided set's up the target framebuffers with both a color and depth buffer attachment.
@yaircambordamorocho45063 жыл бұрын
@@BrendanGalea tnhx! those files are so helpful!! One more thing about the Swapchain recreation, could you give me a little guide to do it? I tried to follow vulkan's tutorial but I get an error that command buffers are in use
@BrendanGalea3 жыл бұрын
Ya I can do that tomorrow. It’s not too tricky, just everything that depends on the swap chain has to also be recreated.
@BrendanGalea3 жыл бұрын
@@yaircambordamorocho4506 Here ya go: github.com/blurrypiano/littleVulkanEngine/commit/aaa1922eab3d26a1df307ea6747461187286991d I've tested only on linux so far but I think it should be good. I'm probably going to make the next tutorial video on this topic, and then cover push constants after that.
@dsl6653 Жыл бұрын
Hello, I just wanna share that if anyone is having the opening file error, and already tried the absolute path, that to me changing the fstream file variable to an ifstream variable solved the error to me.. I think that because it is a compilation file the program cant open with option to write Anyways, thank you for the tutorial, it's super well made!
@shiftingsandsgames2 жыл бұрын
wow what a great job! thank you so much! with the help of ChatGPT my understanding of these fundamentals increased tenfold.
@jacksamurai99462 жыл бұрын
I'm having trouble compiling the vertex shader. If I use an exact copy of what you wrote, which is the same as on the vulkan-tutorial page, I get an error. "shaders\simple_shader.vert:3: error: '' : syntax error, unexpected IDENTIFIER" I've been googling for 2 days and haven't found anything that helps. Any ideas?
@abdullahmertozdemir94372 жыл бұрын
Make sure you use the correct type of brackets
@no-lifenoah7861 Жыл бұрын
pretty good
@AbdulAziz-uo8bk3 жыл бұрын
Can anyone tell me which software are using for this presentation . I really need this types presentation software for planning..
@BrendanGalea3 жыл бұрын
I draw the pictures using the procreate app on an iPad, and then edit the images and apply transitions using the video editor DaVinci resolve. So it’s all pretty manual, any image editing and video editing software should work.
@szabotudor2 жыл бұрын
I tried using GLSL Lint extension for vscode, using the glsllangValidator that came with vulkan sdk, but it keeps giving error: "gl_VertexIndex' : undeclared identifier"
@szabotudor2 жыл бұрын
Just in case anyone else is having this problem, the solution is to set "glslangValidatorArgs" setting to "-V". This will enable the validator to validate for Vulkan (the default being openGL)
@BrendanGalea2 жыл бұрын
Glad you figured it out so quickly!
@Parker87529 ай бұрын
On linux, I kept getting errors opening the shader files - adding std::ios::in to the flags fixed this.
@robbeflot54283 ай бұрын
when I try to compile the shaders (on windows) I get the following error Error: no binary generation requested (e.g., -V) (use -h for usage) I can't seem to figure out how to solve this problem.
@keinplan9058 Жыл бұрын
when ever i compile the programm i get the error "Unhandled exception at 0x00007FF9F588CB69 in VulkanTest.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000C0F1B4F488" at the end of line 18 in lve_pipeline.cpp the memory locations are always diffrent ,do you know anyway i culd fix the issue?
@readme-exeАй бұрын
I think this has already been solved, but I'll leave it here in case someone else needs it. The following possibilities are considered, the file is in the wrong working directory, incorrect path, or both. You can check the working directory with the code below.(This code requires ) std::cout
@ИльдарБулатов-т4х3 жыл бұрын
could you tell me or give me a link to a resource where the creation of several objects in one scene would be described? thank you in advance)
@BrendanGalea3 жыл бұрын
In tutorial 11 I show an example of that being done (but in a suboptimal way). And it actually won’t be until tutorial 20 that we’ve covered enough material to know how to do that in a proper way
@ИльдарБулатов-т4х3 жыл бұрын
@@BrendanGalea благодарю) translation thank you)
@jonj40402 жыл бұрын
I am following along but am stuck at the .bat file, In visual studios, double clicking just slects the file. The filie is not represented by the windows logo, instead a bok with gears if thats of any importance.
@jonj40402 жыл бұрын
so it turns out vs2022 uses something called filters as opposed to folders and as susch the lacation of the files was not correct. furthermore even the source filter is not represented in a file heiarchy when I try to navigate my project in the file explorer. Seeems like an interesting design decision on VS2022 part. But, also wanted to say the tutorial series is great!
@arthurklause52512 жыл бұрын
@@jonj4040 Hey I am on VS2022 to. So you just did as if the filters where folders when following the organization of the tutorial and when entering the fille paths you did as if all filles where in the same folders as they are on disk but not in the filter organization of the project ? :)
@sebastianrichter80543 жыл бұрын
is there a deeper reason why the coordinate system is so different and why vulkan uses not a cartesian system?
@BrendanGalea3 жыл бұрын
Not sure what you mean, vulkan's coordinate system is different but it still is cartesian based. Here's an article that goes into a bit more detail on how it differs from OpenGL's - matthewwellings.com/blog/the-new-vulkan-coordinate-system/
@sebastianrichter80543 жыл бұрын
@@BrendanGalea maybe i should have called it "standard cartesian system" because the quadrants are rotated clockwise by 90 degrees.. i will read it. thanks!
@matanmigdal71083 жыл бұрын
hi can you show how to automate the shader compile whit shaderc lib?
@BrendanGalea3 жыл бұрын
Don’t have that currently planned for the tutorial series, sorry!
@kacperxt3713 жыл бұрын
I'm using visual studio 2019 and I have a little problem with file extension.
@BrendanGalea3 жыл бұрын
Is this with the .spv files for the fragment and vertex shaders? Make sure that they aren't being included as part of your engine compilation. These shader files are separate files that are read into the engine only at runtime. Visual Studio might be trying to compile them as part of the c++ code for the engine, which would cause problems.
@kacperxt3713 жыл бұрын
I mean I was trying to make a file .vert, and I was writing in it, vs didn't recognize what's writing in it
@kacperxt3713 жыл бұрын
@@BrendanGalea never mind! I just didn't install GLSL language integration.
@arthurklause52512 жыл бұрын
@@kacperxt371 I had the same issue thx !!
@sekaus91583 жыл бұрын
can I give you guys a tip to understand something like vertex? try to use Blender this can help you understand batter
@PabloTheDolphin3 жыл бұрын
Hi loving this series so far but I'm stuck at compiling my shaders on Windows. Specifically, my fragment shader throws this error when I run the .bat file: #version: desktop shaders for vulkan spir-v require version 140 or higher Looking at the glslang source code this looks to be a compatibility issue with SPIR-V but everything else so far up to this point has been running fine. Any ideas what could be going wrong? I really want to progress with this series!
@BrendanGalea3 жыл бұрын
The first line of both the vertex and fragment shader files should be #version 450 . I think if you are missing that you might get that error.
@PabloTheDolphin3 жыл бұрын
@@BrendanGalea sorry I forgot to mention I have that at the top of my files as well. Line for line both my vertex and fragment shaders are the same as yours but only the fragment shaders gets this error
@BrendanGalea3 жыл бұрын
In that case I really am not sure. Maybe try using a different glslc? You could try this version github.com/google/shaderc Other than that unfortunately I don't really have a clue...
@hice9623 жыл бұрын
Old post, but I had the same issue. I found out this was caused by the .vert and .frag files not being saved in UTF-8. Maybe this will help other people.
@jono_owa2 жыл бұрын
@@hice962 How did you fix it?
@giorgilataria81642 жыл бұрын
How do I create .vert file in Visual Studio?
@BrendanGalea2 жыл бұрын
The file extension here doesn’t actually matter. But you should be able to just create a new file and when you save it manually type the extension
@10bokaj Жыл бұрын
Is 450 required, could I use 3.3 if I also want to use the shader in an opengl context?
@xr.spedtech3 жыл бұрын
Any video editor like that for windows ?
@BrendanGalea3 жыл бұрын
Yes I use DaVinci resolve to edit the videos
@XiaoZong3222 жыл бұрын
Keep getting the runtime error that is failing to open the .spv files in the shaders/ file. I'm program on Xcode on Mac. I ended up copying the absolute address of the files into "filepath" and it works that way.
@shylex76602 жыл бұрын
Hiya there, like the commenter before me, I know this is an old video, but I was hoping you could maybe give me a hand, I'm using VS2019 and despite now copy pasting in directly from github, am still getting the error. The if statement for file.is_open() catching was having a runtime error at memory location x, upon commenting the if statement to see if it would help me figure out what's up, i got a "vector too long" error. very clueless on how this might happen, but any ideas would be appreciated. I build fine, but running does not work. I love your videos, but my own mistakes are messing me up a bit here D: any chance you could help me out?
@shylex76602 жыл бұрын
I have managed to at least continue with the tutorial, using absolute filepaths seems to work, not sure why the simple shaders/simple_shader one wouldnt work. odd
@BrendanGalea2 жыл бұрын
likely has to do with the working directory of visual studio not being where you expect it to be by default. Try googling how to change the working directory of visual studio to where you want it to be if you want to use relative filepaths. I also show a more general build process in tutorial 23 (in hindsight this is something i wish i did earlier on in the series)
@shylex76602 жыл бұрын
@@BrendanGalea I'll have a look at this, hopefully this will fix it. Thanks for the help anyway, especially on such an old video. Your explanations are excellent and these are by far some of the better tutorials on this website, so thanks for everything you do.
@LolLol-ee1eq2 жыл бұрын
Hello, While writting this in c++ I got another nice little error where the compiler tells me "abort()" has been called. There seems to be an issue with the readFile function. I've tried to catch exceptions with a try and catch block but it doesn't catch any exceptions. I've also seen the comment by nyzs about this topic i trippel checked it and in my code it says "std::ifstream" and not "std::fstream". Thank you for the help :)
@BSPNode2 жыл бұрын
Around 19:56, your shader files are around 1164, and 424 bytes/. My Vertex Shader prints 1164 as well, but my Fragment Shader prints 456 bytes instead of 424. Is it ok for my Fragment Shader to be a little bit over, or is there some sort of read issue in my function? I am writing this in C rather than C++, so I am assuming that there is a bit of padding here or there.
@BrendanGalea2 жыл бұрын
Ya at this point I wouldn’t be too concerned yet. Your file might just have some extra whitespace characters or something like that.
@reznoflovaniak28732 жыл бұрын
When I try to compile the vert and frag files. I get an error saying glslc: error: cannot open input file: 'Resource Files\simple_shader.vert': No such file or directory glslc: error: cannot open input file: 'Resource Files\simple_shader.frag': No such file or directory I'm on windows and am using visual studio where all my shader files are under "Resource Files" in visual studio. Is there any way to fix this?
@BrendanGalea2 жыл бұрын
Easiest solution would be to use the absolute path. So like C:/users/…/simpleshader.vert
@novacaine_.51083 жыл бұрын
Hi there, just caught a small issue with this for me but it seems to work for you, for some reason the lve::lvepipeline(consy std::string& vertFilepath, const std::string& fragFilepath) does not seem to like the & symbol after the std::string, this also applies to the void lve::createGraphicsPipeline function. Removing the & symbol from the cpp and the header file fixed my issue but is there any reason why the constructor and refuses the & on the string?
@BrendanGalea3 жыл бұрын
I'm not sure why that would be. What was the compiler error message?
@novacaine_.51083 жыл бұрын
@@BrendanGalea"void lve::lvepipeline::createGraphicsPipeline cannot convert argument 1 from 'const std::string' to std::string &'" "Conversion loses qualifiers" void lve::lvepipeline::createGraphicsPipeline(....) overload member function not found in lve::lvepipeline
@novacaine_.51083 жыл бұрын
Not entirely sure why it's doing this in comparison to your code but removing the '&' from the hpp and cpp file resolves the issue
@novacaine_.51083 жыл бұрын
Correction* this only applies to createGraphicsPipeline function and not the constructor
@clepirelli3 жыл бұрын
@@novacaine_.5108 check that Ive::createGraphicsPipeline takes a const std::string& as well
@dmitrykolesnikovich4 жыл бұрын
Do you have idea how to use GLSL with Metal ?
@BrendanGalea4 жыл бұрын
No sorry, I’ve no direct experience with Metal
@MosKarck Жыл бұрын
my .vert file is not linking to the project al lthe code is jsut plain text if i write anything. VS2022
@kepcukhusamettin9400 Жыл бұрын
hey did you find a solution
@mr.raider74410 ай бұрын
@@kepcukhusamettin9400 well im a little late, but try installing GLSL language integration and see if it fixes it
@averagecornenjoyer63483 жыл бұрын
little thing I'd like to say, including iostream makes including string unnecessary, correct me if I'm wrong
@BrendanGalea3 жыл бұрын
I did not know that! Thanks :)
@Nikola95inYT Жыл бұрын
I'm currently learning C++ and I can say that enables basic input/output in the console. So you can write into buffer or output to console basic types: chars, ints, floats, etc. The same with arrays, though chars need to be terminated with '/0' symbols at the end. introduces a new type of object, it's type declaration begins with "std::string". It has its own set of methods, which makes operations with strings much easier. Without you cannot initialize strings as objects of std::string class, and you have to deal with them as an array of chars, as well as managing memory for them yourself.
@mostafaghobashy27242 ай бұрын
guys, I have been a c/opengl dev for a long time. I wanted to upgrade to vulcan, so I started writing cpp. I noticed that the readFile returns a vector of char. Why can't it return an std::string?
@tomkimsour3 жыл бұрын
Hi, I m coding on Mac Big Sur with xCode and I'm getting this error when i run the program : std::runtime_error: failed to open file: Shaders/simple_shader.vert.spv I have no clue why, I checked with the file on github and to me they look the same
@BrendanGalea3 жыл бұрын
Likely a path error you could try using an absolute path instead. And did you compile the .vert file to the .spv ?
@tomkimsour3 жыл бұрын
@@BrendanGalea absolute worked thanks also another way around was to change my ide environment build path.
@gamerun54803 жыл бұрын
Hey! So i get the "LNK4098 defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library" error at runtime. How can i solve it?
@gamerun54803 жыл бұрын
I am using vs2019 on windows
@BrendanGalea3 жыл бұрын
I'm not really sure, I'll need a bit more information. Do you know at which point you first started getting these errors. At the end of tutorial 1 were things working correctly?
@gamerun54803 жыл бұрын
I got the errors only when i compiled at the end of the second tutorial
@gamerun54803 жыл бұрын
The point is i get these errors even if i use your code instead of mine, ofc by changing the graphics compiler to the windows version..
@BrendanGalea3 жыл бұрын
I can try reproducing this on monday in visual studio 2019. Have you tried to see if the errors are present in both release mode and debug mode? Might also have something to do with the 32 bit vs 64 bit binary for glfw. It could be something related to this: discourse.glfw.org/t/setting-up-glfw-on-visual-studio/1344/2 I'm not super familiar with visual studio though so I'll have to try some stuff out when I have the chance. But my guess is that your code isn't the problem, and its more to do with the project configuration and setup.
@geegee306 Жыл бұрын
How to make presentatation picture?
@taobowen20162 жыл бұрын
Very nice tutorial! However, I‘m using vs2022 and there is an error when I compile it. It says that unresolved externals "private: static class std::vector __cdecl lve::LvePipeline::readFile(class std::basic_string const &)". I followed vulkan tutorial to setup visual studio environment and I have no idea about this.
@taobowen20162 жыл бұрын
After comparing your code and mine, I eventually realise my error. I implement readFile function with something wrong, my poor c++ >_
@BrendanGalea2 жыл бұрын
glad you were able to figure it out, c++ code to debug can be tricky at times :p
@jonj40402 жыл бұрын
How were your files organized? I'm having trouble getting the .bat file to run and create the spv files for the shader.
@SherlokGnomes5 ай бұрын
Hey, has anyone tried this lesson on linux with wayland? I have transparent window without control elements and don't know if this is normal or not.
@codethinki2 жыл бұрын
removing the " symbol is only counterproductive because paths with spaces are no more one path instead they will be treated as two seperate arguments.
@dalegriffiths36283 жыл бұрын
Fallen at the final hurdle, getting following in xcode terminating with uncaught exception of type std::runtime_error: failed to open file simple_shader.vert.spv terminating with uncaught exception of type std::runtime_error: failed to open file simple_shader.vert.spv
@BrendanGalea3 жыл бұрын
Are your shaders compiled and make sure the file path is correct. Might try using an absolute path rather than the relative file path
@dalegriffiths36283 жыл бұрын
Annoying because the frag.spv and vert.spv files both exist and have data in them.
@dalegriffiths36283 жыл бұрын
@@BrendanGalea Of course of course Mr B..should know by now that my machine likes the absolute... Vertex Shader code size 1164 Fragment Shader code size 424
@zaiscott3 жыл бұрын
@@BrendanGalea This helped me sooooooooo much
@zaiscott3 жыл бұрын
@@dalegriffiths3628 this helped me sooooooo much
@coderflowerdev Жыл бұрын
16:08 Video glitches
@koki101902 жыл бұрын
why does vulkan litearlly look mcuh simpler than opengl
@spht9ng2 жыл бұрын
It's more modern. I really wish more learning resources would be available for Vulkan. OpenGL has much more.