Тёмный
No video :(

GRASS RENDERING in OpenGL // Code Review 

The Cherno
Подписаться 655 тыс.
Просмотров 117 тыс.
50% 1

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 201   
@TheCherno
@TheCherno Год назад
Hope you all enjoyed this one! If you have anything to add drop a comment below 👇 Also hurry and visit brilliant.org/TheCherno to get started learning STEM for free! The first 200 people will get 20% off their annual premium subscription.
@oamioxmocliox8082
@oamioxmocliox8082 Год назад
;)
@CodeParticles
@CodeParticles Год назад
@The Cherno, spot on code review. I always learn a tidbit or two from these and they all add up over time, thx! 👍👍👍
@gwch3481
@gwch3481 Год назад
graphics programmers don't touch grass, they would rather generate and render virtual grass and touch the screen.
@nielsbishere
@nielsbishere Год назад
Can confirm. Sauce: am
@axelanderson2030
@axelanderson2030 Год назад
Yep
@WireWhiz
@WireWhiz Год назад
If you're a VR dev you can even "touch it"
@stuntfax9004
@stuntfax9004 Год назад
UNDERRATED COMMENT 😂
@lolcat69
@lolcat69 Год назад
i can confirm wath you say, cuz as a game dev i will make an entire game just to make a virtual hand touch virtual grass...
@Acerola_t
@Acerola_t Год назад
0:30 oh hey I know that guy
@FullGardenStudent
@FullGardenStudent Год назад
Me too!
@RetroMMO
@RetroMMO Год назад
have my babies
@Acerola_t
@Acerola_t Год назад
@@RetroMMO okay
@kalechips22
@kalechips22 3 месяца назад
Uhmmmmmmmm
@squelchedotter
@squelchedotter Год назад
I really don't like middle star because it makes a lot of type definitions look a lot like multiplications
@amadeusk525
@amadeusk525 Год назад
Yeah, I don't like the trailing star either. The only way to go is leading star. Leading star gang
@theRPGmaster
@theRPGmaster Год назад
I think since since "pointer to x" is ultimately the type, the target type and pointer-star should be grouped together, just like Cherno did in the video.
@squelchedotter
@squelchedotter Год назад
@@theRPGmaster It should be like that, but it's not. If you write `int* a, b`, a will be a pointer but b will not. As far as the parser is concerned, the pointer is part of the variable name, not the type.
@gareth4168
@gareth4168 Год назад
@@squelchedotter I 100% agree. The * makes more sense to me associated with the type but, alas, the language does not work that way and int *foo is correct. K&R, the Linux Kernel etc and other big projects all do it that way.
@Goodwarrior12345
@Goodwarrior12345 Год назад
I actually type all my pointer (and reference) declarations like that. To me it just makes the most sense, that way it's really obvious if something is a pointer or a normal value, instead of being grouped together and your eyes potentially glossing over the thing. There's also semantic separation in it for me - an int is very different from an int pointer, and spacing the * out makes that fact more obvious. But if I'm working with them I always write it as &ref or *ptr, I'm not crazy enough for that. Probably part of why I picked up the habit was that our C/C++ teacher would insert spaces literally everywhere. I don't know if it's his personal style, or people used to just do it like that back in the day, but where you'd write "this->function(value1, value2)" he'd do something like "this -> function ( value1, value2 )". Never really got used to it and eventually I naturally got into a code style that's basically the common Java style, but the pointer star in the middle just kinda stuck I guess.
@mehdouchbhk6445
@mehdouchbhk6445 Год назад
Really impressive how such young people are good at programming nowadays , i wrote my first line of code when i was 18 and only now in my early 20s that i started to really taking it seriously on learning programming and computer graphics. Real Props for that dude!
@maybutworse4409
@maybutworse4409 Год назад
A lot of young people have resources and networks to learn that weren't around even 2-3 years ago. Everybody knows somebody who codes now, and with more people picking it up, it's the new thing for nerdy kids to get into.
@To-mos
@To-mos Год назад
Having to code in the 90's was painful, it involved setting up EPROM erasers with UV lamps and old serial line PIC programmers that got compiled through windows 98. A custom C language called PIC C existed to allow using the chips. You basically had to design your own micro-controller from scratch and budget project kits like arduino, raspberry pi's(Technically SoC), esp32's didn't exist.
@treyquattro
@treyquattro Год назад
it is but I find not many understand the underlying architecture or code that gets produced. It's different for C++ programmers, or should be, since C++ is more tightly coupled with hardware, but people who only know Java or Python e.g., while they maybe hot at algorithms and data structures, would have a hard time debugging at assembler level. Similarly people have difficulty with pointers for the same reason - they're hardware-oriented. That said, there's less and less need to do hardware-level debugging outside of kernel, driver and embedded development.
@infinitesimotel
@infinitesimotel Год назад
@@To-mos Really? I don;t remember it being that problematic. We had desktops from Computer Shopper and Borland at least had turbo C and Pascal. We even played DooM on the college network LoL.
@infinitesimotel
@infinitesimotel Год назад
@@rnayabed Ah, OK.
@Baffi1096
@Baffi1096 Год назад
16:20 There is a saying in our company, if you want speed, pass by value. Most of the time the compiler (especially with O2) will decide what is fastest and either pass by reference or by move semantics.
@mbg47971
@mbg47971 Год назад
i really wish you implemented all your suggested changes so that we could see the difference it makes
@yanisbdf
@yanisbdf Год назад
I was really frustrated...
@Galakyllz
@Galakyllz Год назад
I really enjoyed this code review. The level of detail was great; I appreciate all of the small points you made, even if you think that you "took too long on those earlier parts", I'm learning something. Please, more of this.
@user-dh8oi2mk4f
@user-dh8oi2mk4f Год назад
32:20 AFAIK, for the GPU, a mat3 is just a mat4 with padded zeroes. GPUs don't have specialized mat3 registers, so a mat3 is just a mat4 which is treated like a mat3 in code.
@bluehornet6752
@bluehornet6752 Год назад
I absolutely *LOVE* this type of content, Yan! As someone with a few college degrees including a doctorate, I've basically devoted my life to life-long learning. I've been following you for years now on RU-vid and really must compliment you, as you've developed into an excellent educator. You've always been an excellent C++ developer, and inspire me (read "kick my ass") to push myself to become a better C++ developer with each and every one of your videos I watch. Thank you for making this type of content. I'm incredibly impressed with the amount of effort that this young man has devoted to this project. It's awesome that you took the time to not only do a code review of his code, but also to demonstrate techniques to make it better. I'm not even an OpenGL developer, and I learned a bunch from watching this video. Perhaps the biggest compliment I can give you is to tell you that of all the videos out there these days with what I call "in-content advertising" (ie; the content creator does the commercial live during the video), the commercial you did for Brilliant.org is the only one I've actually watched for months and months now. Usually I just scroll through them, but I watched yours--and even went there and signed up using your 20% discount. So thanks for that as well... I have to say I had my doubts as to the path your channel would take when you left EA and charted this new course, but I'm very happy to see where you're taking it--it's really working very well, and you've really grown into the role. You are *easily* one of the most educational development channels I've ever seen on RU-vid. And finally to Nathan: GREAT JOB on this code! Yan gave you some incredible tips, and I'm sure you will grow as a developer if you understand and implement them. I wish I would have been half the developer you already are, when I was 15.
@weirddan455
@weirddan455 Год назад
15:30 It's interesting whether pass by value or reference/pointer is better. Obviously it can differ case by case but I saw a video of Chandler Carruth at cppcon (Google employee, works on Clang and does a lot of talks about optimization). He said pass by value is often better even for semi-large structs. The reason is that compilers don't do optimization as well when they have to deal with memory. If you pass by value, the compiler knows the function has a unique copy of the data and can better optimize. That may be the reason why you said that code at EA performed better when you did so.
@cton3d
@cton3d Год назад
Please do the video on grass rendering, especially talking about LOD! Would love to see that :) Great video!
@axelanderson2030
@axelanderson2030 Год назад
As an aspiring c++ developer (used python for 6ish years), I have trouble understanding code structure. I know it's subjective, but deciding where to put what and what should handle what is the biggest roadblock for me. It'd be helpful (for me at least) going over some structure and design. Syntax and implementation are no problem, however it always ends up being needlessly complex and I usually rewrite everything once or twice till I'm happy with it. Regardless, thanks for the video cherno, really appreciate your work. Keep it up!
@theRPGmaster
@theRPGmaster Год назад
Same. I've spent a riddiculous amount of time pondering where my public members should be declared, for example. Put them last in the class? Put them first and use an extra access specifier? Maybe struct instead of class? What about member functions? Indecisiveness kills productivity.
@JanVerny
@JanVerny Год назад
Proper code structure and correct use of design patterns etc. are just something that you figure out eventually with experience. Programming isn't like working in a manufacturing line, it's an art, and just like there is no best color for every painting, there is no best solution for all situations. And I wouldn't worry about rewriting and restructuring the code. Maybe one in a million novelists can write a book without ever going back to change something, but it shouldn't be anyone's goal to replicate that.
@axelanderson2030
@axelanderson2030 Год назад
@@theRPGmaster I feel you dude, hopefully with more practice this will get easier!
@Baffi1096
@Baffi1096 Год назад
There are the SOLID principles, which are nice to follow imho. But they can confuse new programmers. Structuring your code in a way, that you only interact with blocks of code through an interface is a very powerful idea. If you introduce some unit testing, in my experience the code structure follows from testing, since you need to find a good way to have small enough code, so that it can be tested separately
@theRPGmaster
@theRPGmaster Год назад
@@axelanderson2030 Det är nog bara mild OCD, like another guy above said: it might be subjective, so we should decide on our own best practices / style rules.
@JamesTamesGames
@JamesTamesGames Год назад
heck yeah more Acerola recognition. Grass enthusiasts should definitely check out his channel.
@Zer0Flash
@Zer0Flash Год назад
the grass looked amazing damn, man has made grass in opengl and c++ when i still take 5 days of errors doing it in unreal engine while following tutorials
@theRPGmaster
@theRPGmaster Год назад
That's what made me start doing graphics programming from scratch, I used UE for a long time, but really it's too much of a spaghetti engine, the only people able to fix those bugs properly are those who made it. The codebase isn't written to be easily extensible/patchable by independent devs.
@peezieforestem5078
@peezieforestem5078 Год назад
You imply that it's more difficult to do in OpenGL and C++, but I'd argue that it is easier than in a high-profile game engine like Unreal. It's similar to what Cherno says in the beginning, that overabstraction is not needed on simple projects, and that actually simplifies the task. Same with OpenGL and C++, simple projects are actually easier without Engines, I'd argue.
@zvxcvxcz
@zvxcvxcz Год назад
@@peezieforestem5078 Yup, I can never seem to figure out these stupid engines. Always seems like there's a million arbitrary cryptic steps to the incantation and you invariably forget one.. and no amount of logic or thinking will let you fix that, just need to hunt up and down the UI and search for a tutorial or something like that... OpenGL, yes, it's a lot of additional code to write, but at least it's code and you wrote it so you know where the hell to find it and fixing it works by the rules of the logic and the programming language, no voodoo required.
@StevenMartinGuitar
@StevenMartinGuitar Год назад
Would love to see you make all your changes and upgrade the quality to make the absolute best grass rendering example!
@furball_vixie
@furball_vixie Год назад
I'm sure I'm not the only one who would love to listen to you talking about rendering grass, without you restraining yourself
@evan_game_dev
@evan_game_dev Год назад
I'm with right gang. Asterisk goes with the variable. Another thing, I completely agree that fragmented memory is slow (not really much to agree on, that's just a fact) but to counteract that, I like to allocate a couple gibibytes of memory at the beginning and put all my non stack memory on there
@stburton00
@stburton00 Год назад
For the SSBO update you may see some speedup if you orphan the data (see: OpenGL buffer orphaning) before the grass positions upload, instead of using glBufferSubData. As written, with glBufferSubData (or glBufferData without orphaning) it could force a sync between the CPU and GPU as the pending GPU draw commands that read from the buffer must complete before the new buffer upload to ensure that the memory is not stepped on while it's in flight, since all draw commands are sourcing from the same buffer (if I understood the code correctly).
@rbaleksandar
@rbaleksandar Год назад
Great video. And through it I discovered the existence of RenderDoc. Thanks a bunch! :D
@vasaaviarion
@vasaaviarion Год назад
Sometimed I forget how late I started programming. Im 23 and wrote my first line of code a couple months ago. Its still quite cryptic to me, but I hope to one day make and release my own video game
@chromosundrift
@chromosundrift Год назад
Great way you handled the idea of program structure for such a small program. As code grows, the benefits of structure grows. I think if you make this point clearly, viewers can see how excess abstraction is problematic and yet tackle the perhaps intended question of how to restructure as the code base grows.
@zami001001
@zami001001 Год назад
its worth noting that trig functions on GPU specifically, at least for sin, cos and tan, are done on the hardware layer directly and end up being only slightly more expensive than something like multiplication. This is of course vastly different that what would occur if you ran the same calculation on CPU which does not have a dedicated hardware instruction for those.
@ultimatesoup
@ultimatesoup 11 месяцев назад
I took a look at hazel. It's pretty neat but has a long ways to go. I would suggest having an components class with all static elements though as opposed to singletons because that way you can control their initialization and destruction
@rmt3589
@rmt3589 7 месяцев назад
Isn't that more OOP than ECS? I prefer OOP, but I don't think Cherno does.
@elderdragon7856
@elderdragon7856 Год назад
The thumbnail so funny 🤣
@gwch3481
@gwch3481 Год назад
Welcome to _grass_
@VictorMistral
@VictorMistral Год назад
For the mat4 that can be faster in not const& in some cases, well that's a register. 64byte, is only a few registers, so it can be passed by register, and that is faster then a memory access that the ref needs, even if the referred memory is in the stack and in cache... But there is a limited amount of register, pass a certain point, it will move the params to the stack instead of register, and that can slower then the ref due to stack move + copy then memory access...
@Goodwarrior12345
@Goodwarrior12345 Год назад
hey I'm middle gang! Seemed like the most intuitive way to type in pointers to me when I was learning about them so I stuck with it.
@sashareinhard6645
@sashareinhard6645 3 месяца назад
me too, except i do it to be different
@samvodopianov9399
@samvodopianov9399 Год назад
When the world needed him most, he came back.
@william383
@william383 Год назад
A video on grass rendering in hazel would be really cool
@HazStepFTW
@HazStepFTW Год назад
Possibly the greatest Cherno thumbnail to date 🤣
@zxuiji
@zxuiji Год назад
39:15 I think a better way to speed it up would be maybe have a single 2048x2048 buffer (perhaps smaller or bigger, not giving heavy thought to this for now) to generate then use for every tile, no re-generating positions of grass blades, just make it dense enough that it difficult to notice it's being reused, as for when the grass should be sparse, still use the same buffer but just min/max blade opacity based on the meshes seed value for rand_r(), if it doesn't have one make it.
@rrutter81
@rrutter81 28 дней назад
commenting for the algorithm. would like to see your take on grass. ive been experimenting with different techniques and its pretty fun
@zxuiji
@zxuiji Год назад
30:52, simple solution, keep the flat plane, rename the y axis to z axis, decide grass xz as usual but before generating any further detail just see if there's a top view triangle of the mesh that encompasses the blade position, if yes then decide the blade's y position based on the triangle's vertices, if no then the blade is never finished or rendered
@Micah20001
@Micah20001 2 месяца назад
this video is kind of nice. I really kind of liked it.
@BrandNewByxor
@BrandNewByxor Год назад
25:03 it's interesting that you mention dropping the `{` onto a new line for function definitions. I've been in the "put it on the same line" gang for years now, but I sometimes find myself adding an empty line at the top of the function body anyway as a way to fight back against the density. I never thought about it though or how the ` {` would fix it
@rmt3589
@rmt3589 7 месяцев назад
I'd rather have a blank line than drop it. It's what I've always did in CSS, and is standard with how I write. Even if I wanted to drop it. If I genuinely tried, it'd become inconsistent. As I'd have to edit it every time.
@DenshinIshin
@DenshinIshin Месяц назад
@@rmt3589 Use a formatting tool like clang-format or whatever tool you fancy. No more inconsistencies. I personally like curly braces on the same lines everything as it just waste too much vertical space for no reasons (namespace, classes / structs / enum, functions, if, switches, loops, lambda, etc). Especially with code folding, having that extra return before the opening curly brace makes the folding happen below, which is counter intuitive imho. I do jump a line in certain situation to make my code less dense, where logical, separating declaration, or return and things like that from the rest of my code, and for constructors, if I use the initializer list, I just put the opening curly below. But that's just a personal preference and in the end, the only thing that really matter is following a convention to make your codebase consistent.
@rmt3589
@rmt3589 Месяц назад
@@DenshinIshin I didn't even know there were formatting tools. I'll see what vscode has.
@oystercatcher943
@oystercatcher943 Год назад
Just seen first few mins. This is super impressive for a 15 year old. Especially in C++ and after a years(!) of Java
@valsk01
@valsk01 День назад
not really... most 14-17-year-olds (including me and my friends) who aren't idiots know shit like this...
@m.hosseinmahmoodi
@m.hosseinmahmoodi Год назад
Am I the only one who didn't know Visual Studio had a 3d model viewer?
@BaJoBr
@BaJoBr Год назад
15:16 std::string_view is not guaranteed to be null terminated which is what opengl expects, std::string is though, something to keep in mind. Taking an std::string_view would require extra validation and possibly copy to add null.
@StarCourtesan
@StarCourtesan Год назад
I like this form of content
@UsatiyNyan
@UsatiyNyan Год назад
Please credit the Acerola! He did actually make a video about grass rendering. And from what we can see apart from the implementation the ideas are the same!
@chill_edits1924
@chill_edits1924 Год назад
TNice tutorials just made it so clear to thank you so much
@mnx64
@mnx64 10 месяцев назад
i think the pointer star belongs next to *window like this, since if you have multiple pointers you‘d have to repeat the * too
@thehambone1454
@thehambone1454 Год назад
I learned a lot from this! I might submit something at some point!
@loli42
@loli42 Год назад
I LOVE CHERNO CODE REVIEWS!!!
@__hannibaal__
@__hannibaal__ Год назад
This code and view i had seen 20 years ago; when i start with OpenGL and my theses on Topology of Fractal geometry.
@johanrojassoderman5590
@johanrojassoderman5590 Год назад
I generally like having the asterisk next to the type, which is nice when you want to define functions without naming the parameters: void operation(type*, type*) It's not as nice when trying to declare multiple pointers at once though. int* a, * b, * c In the last case I tend to just write the pointer next to the name.
@Dagrond
@Dagrond Год назад
Love these reviews, learn so much.
@command1989
@command1989 7 месяцев назад
15:15 std::string_view should not be used to pass strings to C-like APIs like OpenGL, which take strings as const char*, because they typically expect null-terminated strings. string_view does not necessarily point to a null-terminated string, which can make for some painful debugging.
@paccc
@paccc Год назад
You mentioned UBOs, could you maybe do a video on Uniform Buffer Objects for the OpenGL series.
@re4727
@re4727 Год назад
Im sitting here, trying to learn C++ as a senior developer, and your viewers be like: "Hi I am xy, Im 4 years old, and I just wrote something without any study that &re will never be able to. I hope you like it :3 "
@suzanne4300
@suzanne4300 Год назад
I really like the Ray Tracing series. when will the next video come?
@perkele1989
@perkele1989 Год назад
I was “middle gang” for a while, though to clarify it wasn’t really in the middle. It was aligned to the variable name, but with a space between. Just happened to fall into the middle when it wasn’t aligned to other similar locs, if that makes sense.
@ermilburn02
@ermilburn02 Год назад
Since when did Visual Studio have a model viewer?
@theEndermanMGS
@theEndermanMGS Год назад
I believe it was added in VS 2017. I vaguely remember hearing about it around that time, and that's the first version that has a mention of a 3D model editor in the docs.
@zhabiboss
@zhabiboss Год назад
The thumbnail 💀
@Mozartenhimer
@Mozartenhimer Год назад
I became middle star when I was learning C++. It just made more sense to me that this a" character pointer" which in C++ land is char *. I might go to lhs gang though.
@masheroz
@masheroz Год назад
Re abstracting: I want to know that sort of thing. I am writing a gui program using walnut, and the abstractions in there were all new to me.
@nieznanyprzesladowca120
@nieznanyprzesladowca120 Год назад
Regarding code formatting, why don't we just let formatting and naming convention left to the static analyser tools?
@firdodev
@firdodev Год назад
Yoo cooolll
@Tegeran66
@Tegeran66 Год назад
Thank you very much for this review. Could you please tell me that did you press at 36:34 Nsight for correction memory structure? Thanks in advance.
@sflashy6850
@sflashy6850 Год назад
wish you review projects that has written in c#
@on-hv9co
@on-hv9co Год назад
Alright, I'm settled. Converting to middle gang
@thedebapriyakar
@thedebapriyakar Год назад
grass reminds me of the good old days
@ultimatesoup
@ultimatesoup 11 месяцев назад
You have a pretty decent knowledge of graphics. Check out the book real time rendering to get even better as well. I like it cause there is literally no code...it just describes the methods used. You're getting pretty good though. I'll send you my engine one of these days...it's over 100k lines though cause I've been working on it for years
@thev01d12
@thev01d12 Год назад
Still waiting for your vs color scheme
@DavidGispert
@DavidGispert Год назад
color theme?
@tfbhalaleo2546
@tfbhalaleo2546 Год назад
I have a question: if header files can't compile and make an obj file, how can we run a project, it has only a header file (main function definition in this file)?
@crusaderanimation6967
@crusaderanimation6967 Год назад
2:40 Dear Lord, DId you touched it ? DID YOU TOUCHED IT ?
@johnpomaro1731
@johnpomaro1731 Год назад
LOL!... Great thumbnail!!
@erne75
@erne75 2 месяца назад
Small observation. Inside his classes interfacing with OpenGL he should be speaking OpenGL "language". Meaning he should be using/casting to OpenGL types.
@orangasli2943
@orangasli2943 Год назад
@15:54 Luckily you show it there that pass by reference is valid for immutable object like std::string by passing it's constant object reference..maybe I should watch your video again
@emmetray9703
@emmetray9703 Год назад
please review this : int x = 9;
@alexmercerind
@alexmercerind Год назад
Approved. You'll live. - Putin
@OfficialGamingNetwork
@OfficialGamingNetwork Год назад
Very unoptimised and clunky. Disappointed.
@on-hv9co
@on-hv9co Год назад
auto x{9}; please
@emmetray9703
@emmetray9703 Год назад
@@OfficialGamingNetwork you broke my heart
@emmetray9703
@emmetray9703 Год назад
@@on-hv9co you are not a C programmer .
@fraelitecagnin7628
@fraelitecagnin7628 Год назад
It would be cool to see some Rust videos! Have you already tried it?
@Photon852
@Photon852 Год назад
is there a way to make a vulkan/opengl application outside the windows/default main window?
@xravedogx
@xravedogx Год назад
Imo the * should be next to the type, since it's part of the type. Never understood why some prefer it next to the name.
@not_ever
@not_ever Год назад
I do not agree, for the same reason this won't compile. int* a, b = nullptr; or that this does compile but doesn't do what a lot of people might assume that it does: int* a, b; However since it is possible to write the second example, keeping the * by the varible name is perfectly understandable. To be clear no one should be writing code like the above, and, int *a, *b = nullptr; is a recipe for disaster that isn't doing what a lot of people probably expect either.
@DenshinIshin
@DenshinIshin Месяц назад
@@not_ever There's a simple solution to that issue. Don't declare multiple raw pointers on the same line (or if you really want to, separate them with a semi colon like `int* a; int* b;`), and keep the asterisk with the type where it belongs. It shouldn't be much of a problem in C++ anyway, as using naked pointers instead of references or smart pointers should be avoided where possible and thus, you shouldn't have to declare multiple of them, of the same type, in the same scope, or ever at all.
@sureshrawal7913
@sureshrawal7913 Год назад
I have a question how I can start with opengl c++ like you is there any video how to set up openGL and c++ in pc
@user-sl6gn1ss8p
@user-sl6gn1ss8p Год назад
remarkably little roasting on this one
@treyquattro
@treyquattro Год назад
structs aren't heap allocated in C++? News to me! You can allocate anything from the heap. A struct is semantically identical to a class other than the default access control (everything is public by default in a struct, private in a class). Similarly you can allocate classes on the heap, the stack or static memory in C++. I know you know this, I just found the statement misleading, probably because you were trying to identify differences with default Java (or C#) behavior?
@TheCherno
@TheCherno Год назад
I said they're stack allocated in C#, not C++. Structs in C# are value types, classes are reference types.
@jeevan1874
@jeevan1874 Год назад
Where to learn these advanced topics?
@tilaktankasali8756
@tilaktankasali8756 Год назад
Hi, i want the c++ software to my computer please help me to find it, can you give the link to download the software
@thehambone1454
@thehambone1454 Год назад
Do you in general try to avoid heap allocation?
@laenprogrammation
@laenprogrammation Год назад
i'm not quite sure passing 64 bits of data by reference create increased performance at all. I mean it will likely be evaluated using a pointer (except if your function gets inlined), so you are still passing a 64 bit value anyway
@wintermute1814
@wintermute1814 Год назад
It’s 64 bytes. But yeah this could get inlined in which case passing by value would be faster
@glorioussir9673
@glorioussir9673 Год назад
Middle gang!
@awmachanel2816
@awmachanel2816 Год назад
Thank you tNice tutorials really helped!!!!!!!!!!!!
@flowmanSF
@flowmanSF Год назад
What color scheme are you using?
@jeffg4686
@jeffg4686 Год назад
You gotta move to Bevy. Bevy is where it's at.
@neonbyte1337
@neonbyte1337 Год назад
I always ditch hungarian notation, even for members. I just append a '_' at the end of the member (e.g. u32 fragement_shader_id_).
@shanewalsch
@shanewalsch Год назад
What font is that?
@faik...
@faik... Год назад
can you please talk more about the grass
@mudlee1058
@mudlee1058 Год назад
15 years old, my gosh. I dont even remember what kind of toy I was playing with at that age...
@aarorissanen930
@aarorissanen930 Год назад
Cherno touched grass?!?
@codingszy
@codingszy Год назад
Theme?
@peronohaynada
@peronohaynada Год назад
looks like some "mistakes" may be cause the developer is used to java that primitive types are initialized when instantiating a class. I'm a java dev too so I don't see anything wrong in their code lol
@sashareinhard6645
@sashareinhard6645 3 месяца назад
MIDDLE GANG!!!
@1008OH
@1008OH Год назад
Middle pointer gang
@brycejohansen7114
@brycejohansen7114 Год назад
What's grass?
@asandax6
@asandax6 Год назад
It's that thing that is green in color the youngsters are telling each other to touch. I'm not sure where you purchase it though.
@ItsClonkAndre
@ItsClonkAndre Год назад
i think you can smoke it
@m4rt_
@m4rt_ Год назад
Card review? 0:00
@nicom9853
@nicom9853 Год назад
All my homies hate middle pointer gang....
@alexmercerind
@alexmercerind Год назад
In Google Style Guide for C++, they recommend a leading underscore (_) for class attribute (member) names.
@anon_y_mousse
@anon_y_mousse Год назад
Personally, I don't pay attention to style guides. I just do what's easiest and makes reading back my own code easier. Take a couple of weeks off and come back and read what you wrote, if you can't understand how your own code works, then change your style. If you can, then that's what works for you and stick with it.
@DenshinIshin
@DenshinIshin Месяц назад
There's an issue with that. Identifiers with a leading underscore and a capitalized letter are reserved. And a trailing underscore is used by user defined literals. Just be careful with it.
@prafulkhanduri542
@prafulkhanduri542 Год назад
@ The Cherno I llearned c++ but I won't get how can I start the advance c++ and what are the topics in it can you tell it please .and more then stuck on problem solving with c++ I want to work with in applications using c++.
@IncognitoDeveloper
@IncognitoDeveloper Год назад
Shader and mesh actually should be heap allocated because they are assets. In this project it is not important because almost all code is located in main function, but i think it would be cool to implement at least simple asset managing system. Also, yes, they should be smart pointers.
Далее
All about MEMORY // Code Review
33:42
Просмотров 163 тыс.
I made it FASTER // Code Review
38:46
Просмотров 536 тыс.
Only I get to bully my sister 😤
00:27
Просмотров 36 млн
How Do Games Render So Much Grass?
15:52
Просмотров 326 тыс.
RAY TRACING! // Code Review
58:32
Просмотров 151 тыс.
WHY did this C++ code FAIL?
38:10
Просмотров 252 тыс.
RETRO VOXEL ENGINE! // Code Review
36:18
Просмотров 178 тыс.
The Importance of Scalable Code // Code Review
32:10
Просмотров 139 тыс.
Hazel - My Game Engine // Code Review
40:59
Просмотров 115 тыс.