Refactoring Samplers

- Add Sampler base class
- Add ColorAttachment, DepthAttachment classes
- Add function name to all traces
- Add Framebuffer resizing
This commit is contained in:
Thraix
2023-02-05 22:13:21 +01:00
parent 88979a5ab9
commit c2e349eb56
26 changed files with 625 additions and 540 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ namespace Copium
std::string StringFormat(const std::string& format, Args... args)
{
int size = std::snprintf(nullptr, 0, format.c_str(), args...) + 1;
CP_ASSERT(size > 0, "Error during formatting");
CP_ASSERT(size > 0, "StringFormat : Error during formatting");
std::unique_ptr<char[]> buf(new char[size]);
std::snprintf(buf.get(), size, format.c_str(), args...);
return std::string(buf.get(), buf.get() + size - 1);