Get it finally working (somehow)

- Add working example
- Add Namespace defs for Iron Ctr and C3D
- Add Exit func / Vertex / Index counter to Iron
- Add format bytes function to utils
- Make stb_image optional
- Compute texture uv's
- Clear Everything in Drawlist::Clear
- Use Amy::mat4 as matrix lib
- Fix the most stupid rendering bug (i -> m_idx)
This commit is contained in:
2025-12-01 22:10:18 +01:00
parent 078af99ae5
commit 777b23f4c8
15 changed files with 138 additions and 376 deletions

View File

@@ -17,6 +17,22 @@ vec<uc> LoadFile2Mem(ksr path) {
return res;
}
str FormatBytes(ull bytes) {
static const vec<str> endings = {
"B", "KB", "MB", "GB", "TB", "Unk",
};
int i = 0;
double b = bytes;
while (b > 1024) {
i++;
b /= 1024;
}
if (i >= (int)endings.size()) {
i = (int)endings.size() - 1;
}
return std::format("{:.1f} {}", b, endings[i]);
}
ui HashMemory(kvr<uc> data) {
ui hash = 4477;
for (auto& it : data) {