• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Razakhel / RaZ / 18059902851

27 Sep 2025 12:32PM UTC coverage: 74.093% (+0.04%) from 74.05%
18059902851

push

github

Razakhel
[Utils/Logger] Added formatted logging overloads

- Formatted calls to logging functions and made use of std::format() in several other places

100 of 170 new or added lines in 36 files covered. (58.82%)

4 existing lines in 2 files now uncovered.

8334 of 11248 relevant lines covered (74.09%)

1757.71 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.0
/src/RaZ/Data/MeshFormat.cpp
1
#include "RaZ/Data/FbxFormat.hpp"
2
#include "RaZ/Data/GltfFormat.hpp"
3
#include "RaZ/Data/Mesh.hpp"
4
#include "RaZ/Data/MeshFormat.hpp"
5
#include "RaZ/Data/ObjFormat.hpp"
6
#include "RaZ/Data/OffFormat.hpp"
7
#include "RaZ/Render/MeshRenderer.hpp"
8
#include "RaZ/Utils/FilePath.hpp"
9
#include "RaZ/Utils/StrUtils.hpp"
10

11
#include "tracy/Tracy.hpp"
12

13
namespace Raz::MeshFormat {
14

15
std::pair<Mesh, MeshRenderer> load(const FilePath& filePath) {
2✔
16
  ZoneScopedN("MeshFormat::load");
17
  ZoneTextF("Path: %s", filePath.toUtf8().c_str());
18

19
  const std::string fileExt = StrUtils::toLowercaseCopy(filePath.recoverExtension().toUtf8());
2✔
20

21
  if (fileExt == "gltf" || fileExt == "glb") {
2✔
22
    return GltfFormat::load(filePath);
×
23
  } else if (fileExt == "obj") {
2✔
24
    return ObjFormat::load(filePath);
2✔
25
  } else if (fileExt == "off") {
×
26
    Mesh mesh = OffFormat::load(filePath);
×
27
    MeshRenderer meshRenderer(mesh);
×
28
    return { std::move(mesh), std::move(meshRenderer) };
×
29
  } else if (fileExt == "fbx") {
×
30
#if defined(RAZ_USE_FBX)
31
    return FbxFormat::load(filePath);
32
#else
33
    throw std::invalid_argument("[MeshFormat] FBX format unsupported; check that you enabled its usage when building RaZ (if on a supported platform).");
×
34
#endif
35
  }
36

NEW
37
  throw std::invalid_argument(std::format("[MeshFormat] Unsupported mesh file extension '{}' for loading", fileExt));
×
38
}
2✔
39

40
void save(const FilePath& filePath, const Mesh& mesh, const MeshRenderer* meshRenderer) {
1✔
41
  ZoneScopedN("MeshFormat::save");
42
  ZoneTextF("Path: %s", filePath.toUtf8().c_str());
43

44
  const std::string fileExt = StrUtils::toLowercaseCopy(filePath.recoverExtension().toUtf8());
1✔
45

46
  if (fileExt == "obj")
1✔
47
    ObjFormat::save(filePath, mesh, meshRenderer);
1✔
48
  else
NEW
49
    throw std::invalid_argument(std::format("[MeshFormat] Unsupported mesh file extension '{}' for saving", fileExt));
×
50
}
1✔
51

52
} // namespace Raz::MeshFormat
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc