Me anxiously keeping my eyes peeled for the cactus on his table, hoping he doesn't accidentally stab himself, only to nearly get a heart attack at 5:30
@carlosdalomba3 жыл бұрын
LOL
@ibrahimhabibeh69043 жыл бұрын
Wow I see Cherno still looking at our comments 3 years after posting ❤️
@widrolo3 жыл бұрын
@@ibrahimhabibeh6904 oh my god i didnt even notice that
@StarContract7 жыл бұрын
Top quality channel. The best around for cpp.
@raf.nogueira7 жыл бұрын
OMG, I tried to learn modern OpenGL for so many months, and only now I finally understand the basic pipeline, Thank you so much Cherno!
@RomanWaves8 ай бұрын
i dont get anything actually ...so there buffers who interpret a stream of bytes ? is there any other course, which kind of starts a bit earlier ? i mean, i understand on a very basic level what happens with graphics ... but cherno lays out the code as if it is a logical progression, whereas i cant follow - anyone on the same page ?
@thousandpoundcat56967 ай бұрын
@@RomanWaves check out his C++ series, maybe look at the Arrays video, or even earlier if you want to learn about bytes and memory. in this case, the memory space (buffer) will be allocated in the GPU (as it is good at graphics), which can be accessed using OpenGL+GLEW
@brod5157 жыл бұрын
I've Used Photoshop and that analogy of how binding compares to Photoshop layers is Brilliant.
@zorbix36524 жыл бұрын
hi
@brod5154 жыл бұрын
@@zorbix3652 hi
@vectork34 жыл бұрын
@@brod515 ayy you replied after 2 years. How are you with opengl and graphics?
@zelda_smile4 жыл бұрын
@@vectork3 its been 2 weeks, we need to know
@alfonsld76844 жыл бұрын
Come on man, tell us!
@chrisreuter58435 жыл бұрын
Man you're an awesome teacher. I found your channel about 3 days ago, and it's already in my top 5 favorite KZbin channels ^^b Thanks so much for putting in your precious time and effort in teaching us! XD
@slap_my_hand7 жыл бұрын
5:50 I never knew that you can select text like that in visual studio
@alexkiecker41757 жыл бұрын
Shift + Alt + Arrow keys do the same thing.
@borekworek695 жыл бұрын
@@alexkiecker4175 or alt + mouse click
@feschber5 жыл бұрын
@@borekworek69 it also isn't just visual studio it works almost anywhere
@VivekYadav-ds8oz5 жыл бұрын
Can someone please tell how does Cherno does that thing where he selects a certain code then just uses some keyboard combination to shift the whole block of code up or down. This feels very useful when you want to put some code outside a scope INTO the scope.
@osere64325 жыл бұрын
@@VivekYadav-ds8oz alt + up/down with the line selected or cursor on the line
@p9malino2677 жыл бұрын
I've been having difficulty with looking for decent tutorials for opengl but then you came along and made learning opengl for me so much easier! Your tutorials explain things so well and are great for beginners. Thank you for making them!
@amiright77844 жыл бұрын
I shall ask my uni for a refund and become the ultimate patreon.
@zorbix36524 жыл бұрын
good 4 u
@felixchien16644 жыл бұрын
right you are my good sir
@rukna37753 жыл бұрын
but uni gives u a degree, youtube doesnt. no offense, I am also a supporter of fuck school and learn online cult but still, in real world interactions between people, having a degree makes ur daily interactions a lot easier.
@KayVerbruggen7 жыл бұрын
Damn, I did not expect you to upload this consistent. If you can keep this up, you might be the first youtuber I'm gonna donate some money to!
@AllanJeremy7 жыл бұрын
agreed, he's awesome
@alexkiecker41757 жыл бұрын
Is he going to pop your donation cherry?
@mhammedhassnouni47557 жыл бұрын
Ce jeune est un génie !!
@OGA-b4l4 жыл бұрын
did you donate?
@SamWillBenchYa3 жыл бұрын
@@mhammedhassnouni4755 lol
@robosatchlol10995 жыл бұрын
I just found your channel and must say amazing job and thank you so much! I'm currently preparing for an entry exam for a game engineering degree and your videos are helping big time! You earned yourself a new subscriber :)
@JasonEwton7 жыл бұрын
Dude. You're easily the best resource for modern OpenGL and im only on episode 4. Mad mad mad respect for what you're doing. Can't wait for the game engine bit (polite request to make it 3D)
@sarahshahzad5 жыл бұрын
I love these series so much! I started programming in 2013 and OpenGL was alien to me when I started in 2014. This is the first time I actually understand stuff without searching for everything on 10 other tabs. Thank you! (That charisma though)
@clodgozon39685 жыл бұрын
Back then, I wasn't able to follow your tutorials since my head wasn't "organized" at that time, and I have too poor logical thinking skill to understand you. Now that I do have decent skills, it looks like your tutorials are pretty easy to follow. Thanks Cherno!
@ewanarends55126 жыл бұрын
I've been searching for good openGL tutorials for months, although i use a java binding, this really helps me out, thanks for creating those amazing tutorials! keep it up
@f41nT4 жыл бұрын
So basically opengl is working just like the cpu: working with the current value of the accumulator. I'm in my first semester in computer science and at the same time I'm learning open gl with your videos and it's really fun. You explain it so well I understand literally everything and English is not even my first language :D
@nickgennady2 жыл бұрын
Wow I know this video is old but it’s so helpful. That documentation site helps me so much. I’m targeting OpenGL 3.3 and OpenGL ES 2 . Now I can check what I’m using is supposed.
@samdavepollard11 ай бұрын
really appreciate the detail you go into; so many opengl tutorials out there which throw a bunch of code at you with superficial explanation many thanks
@jpsilver35106 жыл бұрын
DUUUDEEE!!! I F*ckin love your tutorials!!! Where have you been all my life xD
@thenerdyouknowabout6 жыл бұрын
Dear god this is perfect. Youre absolute credit to the community.
@Fernando-du5uj Жыл бұрын
That notion about opengl being state machine was great. It makes so much sense now. Thanks a lot, mate.
@marcovalentinoalvarado32905 жыл бұрын
This channel is dramatically underrated.
@CriticalFlinch Жыл бұрын
Wow your explanation of vertex buffers and their relationship with drawing was great, been trying to understand how it call comes together for a few says
@MieysoFelix2 жыл бұрын
For a moment, let's appreciate the work that Yan put in that series. FOR US!
@rahulta20004 жыл бұрын
Awesome video. Learned a ton of stuff from this that even many paid tutorials don't explain well.
@suhassreenivas18786 жыл бұрын
great quality content... and man ... those explanations are golden (from prev video : I finally understood where the openlgl implementation is and what graphics drivers contain) !
@sajibsrs5 жыл бұрын
I like your extended version of explanations. Thank you
@yojalin18772 жыл бұрын
Thank you so much Cherno!I come from China,and I am your fans.
@Marnie_C4 жыл бұрын
That analogy to photoshop helped explain the binding concept leagues better than my college teacher ever could
@deblish5 жыл бұрын
10:11 alt+shift trick was mind blown
@cameroncollins43415 жыл бұрын
same here
@CipriValdezate4 жыл бұрын
You are an excellent teacher, far far better than the professors of my uni.
@samarthtandale9121 Жыл бұрын
Great video ! Gave a lot of conceptual clarity !
@prezadent17 жыл бұрын
The following 2 lines placed after the line with glBufferData will use the default shader on most Nvidia and maybe most AMD GPUs. You should get a white triangle on black background. glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 2, 0); glEnableVertexAttribArray(0);
@ErneTalu3 ай бұрын
Ty
@yuansizhu62715 жыл бұрын
My teammate tried to teach me OpenGL, but what he said is a mess... So I come watching your vedios and this is brilliant!
@Argletrough3 жыл бұрын
docs.gl is mostly the official documentation with a search function, although the version availability indication could be handy... Linux users will be pleased to hear that OpenGL-Refpages (the source for both) exports to manpages, installed in the 3G section. (The package is opengl-man-pages on Arch).
@ninadsachania36527 жыл бұрын
You deserve way more subs, man! Consistent and quality uploads.
@alexkiecker41757 жыл бұрын
"Consistent". Tell that to all the sparky engine fans
@lCanShowYouTheWorld5 жыл бұрын
If you get "Exception thrown at 0x00000000 in Engine.exe: 0xC0000005: Access violation executing location 0x00000000. " Try to put your "glewInit();" after "glfwMakeContextCurrent(window);"
@Temeliak2 жыл бұрын
Thanks!
@maddoo232 жыл бұрын
Wow, thanks. It solved my other problem. When I ran the code at 17:16, it gave me the error "exited with code -1073741819.". Can you please tell me why it works that way?
@postulysses Жыл бұрын
Ευχαριστούμε!
@elnazzamani51104 жыл бұрын
You explain neatly. I like how you specify details. I wish I found you last semester which I failed Computer Graphics
@skaffen10 ай бұрын
Your series are incredibly useful to understand OpenGL. OpenGL is a weird way of conceiving 3D when you go from scratch 3d engine like me.
@guineapigmart8823 жыл бұрын
I must say that the outro is the same top notch quality as the video it self.
@Ocmersh4 жыл бұрын
Made a lot more sense coming from you, than my graphics professor. Thanks!
@RudolfCickoMusic7 жыл бұрын
Congratulations for that very educational and clear videos. I learn very much with you. Thank you !!
@Brick10Man6 жыл бұрын
Your videos are great! Very clear explanations of core ideas in OpenGL. Very helpful.
@tanchienhao2 жыл бұрын
BIG fan of this series btw :) thank you so much for making these free for everyone as a fantastic educational resource! at 10:43 cherno said he is not a fan of doing sizeof(positions). why? what's the best practice for the size parameter?
@chastitywhiterose Жыл бұрын
Imagine that the array was allocated on the heap instead of the stack, then you would be required to do it the way Cherno does it.
@chastitywhiterose Жыл бұрын
Or the array was allocated to be a very large array and you didn’t want to send megabytes worth of data to the gpu when you only needed 6 floats to draw the triangle.
@tanchienhao Жыл бұрын
@@chastitywhiterose I see! Thanks!!
@Lordp00m5 жыл бұрын
Excellent tutorial! Learned a ton of new stuff already!
@_Mrunalwankhede2 жыл бұрын
I didn't understand any code he did or copied in the previous two videos, but I trusted the process, and I think now I will finally learn what the code is actually doing
@JaccovanSchaik7 жыл бұрын
OK, two questions: 1. How many buffers would a program typically allocate? Dozens, thousands, millions? 2. You still haven't told GL you're giving it floats, or that there are two coordinates per vertex. Is this still to come? Loving the series!
@JaccovanSchaik7 жыл бұрын
No., that's very helpful, thank you. So the limit is the total amount of memory used, rather than the number of buffers?
@jamesmnguyen7 жыл бұрын
Jacco van Schaik Yes, very rarely do you reach the numerical limit of vertex buffers.
@JNelson_6 жыл бұрын
You explain things so well. :)
@tomkohler16092 жыл бұрын
7:05 You should never communicate to OpenGL with data types like "unsigned int", but always use GL's own types like GLuint. Because GLuint ist guaranteed to be 32 bits, while "unsigned int" may be 32 or 64 bit (depending on the platform and architecture). While this is not big problem when passing values, it could make trouble when passing pointers or upload vertex data.
@il26262 жыл бұрын
why is it guaranteed? if I look at the definition it just defines it as unsigned int
@tomkohler16092 жыл бұрын
@@il2626 Yes, this is true for x86 (32 bit and 64 bit) Windows and Linux, but for another architecture and platform an unsigned int may be 16 bit or 64 bit. This is also stated in the OpenGL specification: „GL data types. GL types are not C types. Thus, for example, GL type int is referred to as GLint outside this document, and is not necessarily equivalent to the C type int. An implementation must use exactly the number of bits indicated in the table to represent a GL type.“ Besides of that it makes the code also more verbose: "What is this buffer thing? Ahh, it's a variable that stores an API dependant value."
@il26262 жыл бұрын
@@tomkohler1609 thanks for explaining
@MS-bl9ch4 жыл бұрын
The way you explain right from scratch simply awesome 😎 man 👍
@zen-ph8yj2 жыл бұрын
Your series help me a lot thanks.
@Moriadin Жыл бұрын
Superb videos! Thank you!
@achraf86944 жыл бұрын
5:53 how do you select all those arguments perfectly without selecting the stuff around it i can't figure it out
@achraf86944 жыл бұрын
nevermind guys i found it you can click and alt drag or do shift alt and use your arrow keys to move it
@jasonwhitworth1177 жыл бұрын
Wow dude. This is the best explanation I've ever heard!
@rutexgreat3619 Жыл бұрын
Very professional and simple...
@austinkim94023 жыл бұрын
That Photoshop analogy was a godsend
@АндрейБорисов-и4о3 жыл бұрын
Thank The Cherno! Cool video!
@Killerkraft975 Жыл бұрын
Currently behind in my graphics module at university and trying to understand what the example code is and this is a life changer 😂 thank you
@Killerkraft9756 ай бұрын
Its funny, a year later, im back here, writing a report on a fluid simulation using this series as a base and needing to refresh my mind on how this works.
@joepeters87466 жыл бұрын
to "drawr" a triangle, I love the Aussie accent :D
@wyntermc212611 ай бұрын
Excellent videos, really helpful.
@tomneijman42124 жыл бұрын
Around 7:13 Yan is creating an unsigned int buffer, the type of the second parameter of glGenBuffers is GLuint. Isn't it safer to declare buffer as GLuint? I saw that GLuint is just a typedef declaration for unsigned int, so maybe it doesn't matter??
@tomkohler16092 жыл бұрын
Yes, always use OpenGL's data types.
@certifiedcat64352 жыл бұрын
@@tomkohler1609 what about if your working with multiple api and you have to pass around data
@mhammedhassnouni47557 жыл бұрын
Vos vidéos sont juste parfaites, du beau travail.
@JohnSmith-bs5mg7 жыл бұрын
Yay! Thanks a lot! I hope that drawing complex polygons will come before shaders. Cause almost everybody do such tutorials: draw a triangle and describe whole graphics rendering pipeline with that freaking triangle. Vertex shaders, rasterization, fragment shaders, etc - and still triangles.
@kieranvs7 жыл бұрын
You do everything with triangles! More complex polygons are actually just several triangles next to each other. I'm not sure if your comment was a joke haha, if so I apologise
@JohnSmith-bs5mg7 жыл бұрын
Not joking. I don't remember correctly, but there is function that does groups of vertices, which do not have repeated vertices. Like (1,0),(0,1),(0,0),(1,0),(0,1),(1,1) is the default array that describes square of two triangles. But you pack them like (0,0),(0,1),(1,0),(1,1) in the array using that function. I really what to see how Cherno would apply shaders, textures and stuff to something more complex than square, maybe a hexagon? Something that can be used in real 3D model. Drawing complex figures is hard.
@vaualbus7 жыл бұрын
You have to have a shader anyways. And complex geometry can be done in geometry shaders. We need matrix and shaders than you can draw complex stuff.
@kieranvs7 жыл бұрын
I think you're talking about a triangle strip. That's just a way to push loads of triangles to the gpu without the repeated vertices. The gpu can only draw triangles. It's triangles all the way down, haha. If you want a hexagon, you can draw that using 4 triangles. Any n-polygon can be drawn using n-2 triangles
@RandomGuyyy7 жыл бұрын
That's the thing about modern OpenGL. Everything is based on programmable shaders and there are a whole load of function calls just to do a "Hello, World".
@D1mas215 жыл бұрын
Another nice one! Thank you)
@sahsaaryutin3 жыл бұрын
This is the best explanation that ever find Even though my native language is Russian, there are no subtitles and specific words are used here Learning OpenGL not rocketscience with You! 👩🚀
@ShirChoi3 жыл бұрын
why do I get a segmentation fault on glGenBuffers(1, &buffer)?
@antiHUMANDesigns7 жыл бұрын
This is where doing it OOP makes things less messy, and less error-prone. For example, quick and dirty to show the point: class Object2D { public: Object2D() { glGenBuffers(1, &mBufferID); } ~Object2D() { glDeleteBuffers(1, &mBufferID); } void Draw() { glBindBuffer(GL_ARRAY_BUFFER, mBufferID); glDrawArrays(GL_TRIANGLES, 0, 3); } void setVertices(float* vertexArray, int numVerts); // or something, calls glBufferData to upload verts. protected: GLuint mBufferID; }; ...and then you'd just... Object2D triangle; // generates a buffer, and will delete it when this object goes out of scope. triangle.setVertices(myVertexArray, 3); // uploads using glBufferData triangle.draw(); // binds the buffer and draws the vertex array. ... and this way you won't forget to bind buffers and such stuff, so you avoid bugs. Yes, obviously not well written, but the point is demonstrated.
@necrondow_6 жыл бұрын
As he has said several times... You can choose to abstract the code as you see fit :) This series merely focuses on the OpenGL code required to make things happen. He works for EA, programming the Frostbite engine... So he is certainly fully aware of OOP principles.
@TechnologyRules5 жыл бұрын
That's why will never be a good idea to do games using pure JS. Any language without types should not be used at all for anything that involves complex logic.
@codialex4624 Жыл бұрын
I am getting an error "Exception thrown at 0x00000000 in OpenGl.exe: 0xC0000005: Access violation executing location 0x00000000." at line "glGenBuffers(1, &buffer);"
@finnf24622 жыл бұрын
finally a normal tutprial that does not speedrun opengl and explains everthing in a logic way
@amankharb24016 жыл бұрын
Keep up the good work man!!
@cnsujeer4 жыл бұрын
freaking amazing content and explanation!
@jessefinnegan1719 Жыл бұрын
Has The Cherno ever said what theme that he uses? I really like the look of it and would love to use it in VS. Great videos btw.
@fraelitecagnin76283 жыл бұрын
17:16 wow, I'm at a good point then🤣
@operu4 жыл бұрын
Is all of this still up to date for 2020? I'm about to watch all this and dig deep, but i wont if its not updated
@Quesbe4 жыл бұрын
It is! And it will still be as long as you are using OpenGL 4 (which is still the latest version)
@operu4 жыл бұрын
@@Quesbe Is OpenGL 4 the version being taught in this series?
@IkeVoodoo4 жыл бұрын
@@operu Yes. OpenGL 4 Is what i believe is taught in this series.
@DE01247110 ай бұрын
I can't learn for my test if the cherno has an opengl series I need to watch.
@michaplucinski142 Жыл бұрын
I have worked with SFML a bit and now tried this, because I couldn't find good source to understand vertexes, their buffers and all of that This series makes it easier, but it also feels so complicated at moments, that I am gonna get a headache from that
@newsogn51486 жыл бұрын
Being able to look over your shoulder for the price of a free subscription is a marvel of our society. If I wasn't so distracted half the time I could be so much smarter!
@ccdd31043 жыл бұрын
good video thanks Cherno
@sundayscrafter17795 жыл бұрын
Hi there, does it also work in SharpGL since it’s supposed to be an OpenGL equivalent in C#?
@jixs4v4 жыл бұрын
just put in some more effort and use c++
@oilolive42123 жыл бұрын
I am from Mexico, I follow your videos but this video is the only case in which you do not have subtitles, I would greatly appreciate if you could add them Excellent video Good day
@tricky7784 жыл бұрын
do legacy opengl functions build buffers and uniforms that we can use in our shaders so someone can paste some legacy opengl that already does some of the right thing and we can just move on with useful functionality done and finished?
@wesleyferreira33505 жыл бұрын
You rock dude!
@salmanahmad16 жыл бұрын
This guy is just magic
@WilliamAncich3 жыл бұрын
10:37 Could anyone speculate as to why specifying size with 6 * sizeof(float) was preferable to sizeof(postitions)?
@1280charms3 жыл бұрын
the 6 in 6 * sizeof(float) is the sizeof(positions)
@WilliamAncich3 жыл бұрын
@@1280charms But sizeof() returns the size in bytes, so sizeof(positions) returns 24 as does 6 * sizeof(float). My question was why is the second form preferable when the first seems simpler. Watching this back though he says the first method only works because it's allocated on the stack so my guess is it's in the interest of consistency.
@tristunalekzander56084 жыл бұрын
For some reason everytime I open this project visual studio changes something and the last time I opened it glew worked and now it doesn't I get this warning "1>glew32s.lib(glew.obj) : warning LNK4099: PDB 'vc120.pdb' was not found with 'glew32s.lib(glew.obj)'" And I have "glew32s.lib" in my additional dependencies in linker.
@nanoic29642 жыл бұрын
At 8:49 when binding the buffer I am getting a access violation. I am using VS2022.
@azula8678 Жыл бұрын
same, how u figured it out?
@garbohydrates1936 жыл бұрын
Why didn't you create a swapchain for the front and back buffers?
@diato29933 жыл бұрын
thank you very much !!
@Albert-px4jo5 жыл бұрын
If the tessellation shader and compute shader can also be covered, that will be nice
@shivanshuraj71756 жыл бұрын
So good video !!
@JakobRobert006 жыл бұрын
You can also just pass an array directly to the glVertexAttribPointer function. Is there a significant performance boost in using VBOs over normal arrays?
@alexjulius692 жыл бұрын
I'm finally beginning to understand everything, it's been long 3 days let me tell you that.
@glenneric13 жыл бұрын
Great stuff!
@hichamwarryor35473 жыл бұрын
Thanks so much 🌹 I hope some one make tutorials for development Android with c++ 😍
@joseplano47894 жыл бұрын
GREAT channel!! ...It would be nice if you do a serie of integrating assimp library for models and specially with animation, blending between animation, how to load differents animation for 1 modelt etc...
@davidboygenius68433 жыл бұрын
Do I need to know everything about C++ before jumping into Opengl? I understand the fundaments(pointers, references, functions, arrays, classes, structs, conditional statements, loop statements and data types)
@anuragparcha44832 жыл бұрын
Thanks for this series, loving it so far. I had a doubt, why didn't you initialize "positions" array as a standard array type? As far as I have gathered it has no overhead but provides extra functions. Am I wrong?
@alexhartung23694 жыл бұрын
seriously inspiring to enter the field of computer graphics
@dohyun00474 жыл бұрын
i have a question... so glGenBuffer(1, &buffer) is just giving unique id (which is buffer's value, not specified on this video) right?