We are currently in the process of converting the website to the new design. Some pages, like this one, are still broken. We appreciate your patience.
Mārtiņš Možeiko
Inlining is about extra optimizations compiler can potentially do. Often that allows to remove lar…
»
da447m
if code you call is really performance critical, you actually don't want any call at all, you want…
»
n00bmind
5 years later, I found this video which I think is incredibly illustrative, basically explaining t…
»
Terans
In the code of the PID camera on Day 504 ( ), it seems that Casey is doing an analytic integration…
»
Mārtiņš Možeiko
Theoretically having function in one copy should be faster, because that will use less space in co…
»
da447m
OK makes sense. And what about the performance? Would having copies of the same functions be actua…
»
da447m
Sry Im dumb and didn't click godbolt, now I just learned that that is actually a block scoped thin…
»
Mārtiņš Možeiko
Think of S in my code example as timed_block. TIMED_BLOCK macro expands to timed_block var(args...…
»
da447m
Sure this will happen for void f(), but why would it happen for any of the curly braced TIMED_BLOC…
»
Mārtiņš Možeiko
It's fine to use headers if you want to use headers. There's nothing wrong with it. What I was say…
»
Mārtiņš Možeiko
That's how destructors work - objects that go out of scope call destructor when object is released…
»
da447m
First of all you should forget about "header" files or #include's. For compiler they do not exist.…
»
da447m
Ok gotcha, thanks Martins. Just having scope closing bracket } will automatically close timed bloc…
»
Mārtiņš Možeiko
That's a mistake in code during editing/refactoring. This macro is not used anymore. Before it had…
»
Mārtiņš Možeiko
Ability or desire to inline function or not compiler decides on its own regardless of inline or st…
»
da447m
I'm a bit surprised this thing can be done like in handmade_debug_interface.h, I've never seen thi…
»
da447m
For the colors, you just need to type the language name just after the 3 back quotes without space…
»
Simon Anciaux
A static variable in a class or struct is accessible as long as you know the definition of the cla…
»
da447m
This works because Casey uses this variable in a single translation unit. Hmm ok, but then global …
»
da447m
ahah all good no problem
»
Jason
Was typing out a response but Mrmixer already beat me to it lol.
»
Simon Anciaux
This works because Casey uses this variable in a single translation unit. Handmade hero is compile…
»
da447m
Yeah that part I think is clearer to me, but how can he declare/init a static loose in a header fi…
»
Jason
I believe that means that all calls of that function will have the same FailCounter variable as if…
»
da447m
In one of the vids Casey mentions that static in C++ really has more than one meaning. Then in han…
»
longtran2904
How can I find a planar embedding of a graph and draw it on a grid? I've tried to read some papers…
»
Oliver Marsh
Thanks again Martins
»
Mārtiņš Možeiko
Last time I saw the that part code it updated slice of texture with glTexSubImage3D whenever neede…
»
Oliver Marsh
Hi, just a couple more questions :) How did Casey manage the texture2Darrays? Did he alter the tex…
»
da447m
Oh now I went through files I received, there's a github key. Thanks.
»