[7] Renderer Hacking: Store shader nodes in a shared memory pool

preview_player
Показать описание
Today we implement a simple memory pool, and use it to streamline memory handling for the new up-and-coming node-based shading system.

I messed up when modifying the calloc() call in newBlock() at 1:15:15 ! It should have been calloc(1, sizeof(*newBlock) + initialSize);

Also, the implementation doesn't skip the first 24 bytes, since we only increment the size *after* getting the pointer.

ALSO, I am *not* passing in the global pool around correctly, the head just doesn't get updated on the scene level. It only worked because all the nodes *happened* to fit in a single 1kB block!

If like this style of programming videos, go watch Andreas Kling (he's really good!):

Рекомендации по теме
Комментарии
Автор

Ok, now got an idea of what's a raytracer and what is Nvidia RTX

yeppiidev
join shbcf.ru