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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user