RSSAmplifier

Blog

CPP Rendering – Antoine MORRIER

Blog talking about 3D rendering, Qt and C++

cpp-rendering.ioRSS feed ↗5 posts

Latest posts

Simplify hashing in C++

This article explains how to simplify hashing in C++, allowing us to hash multiple values, or range of values with a simpler syntax. The post Simplify hashing in C++ appeared first on CPP Rendering - Antoine MORRIER .

C++ type erasure: a std::polymorphic implementation

We re back on type erasure today, with a simple polymorphic implementation. C++26 is going to introduce two new types: The only drawback of std::polymorphic It relies on an interface with virtual functions. But thanks to that, you continue to manipulate value, with its copy or move :). std::polymorphic usage The goal of this article is [ ] The post C++ type erasure: a std::polymorphic…

Sky and Atmosphere rendering: A physical approach

Sky colors have fascinated people for years. I propose a physically based sky and atmosphere rendering method. We will dive into the physics of the sky and go to the implementation. At the end of this article, you should be able to: Here are the expected result(the sun has been enlarged purposefully): Basics of rendering [ ] The post Sky and Atmosphere rendering: A physical approach appeared first…

Small-Object Optimization applied to std::variant

This article dealing with Small-Object Optimization comes from a discussion with a colleague of mine, Florian Carnac. We discussed std::variant and the fact that if you use it with types of different sizes, you can get some memory wasted. The description of the problem std::variant Ts... is a type-safe union. It means its value is one [ ] The post Small-Object Optimization applied to std::variant…

How to implement a vtable for our custom type erasure type

We will see how to improve our erasure type and, more specifically, how to implement a vtable. Here is the current list of our articles on this subject: Introduction The problem with our current implementation is that each instance of our erased type embeds a list of function pointers. It means that if you have [ ] The post How to implement a vtable for our custom type erasure type appeared first…