Browse Source

Rename gltf file class

master
Riyyi 4 years ago
parent
commit
b8bd6aad70
  1. 6
      inferno/src/inferno/io/gltffile.cpp
  2. 2
      inferno/src/inferno/io/gltffile.h
  3. 2
      inferno/src/inferno/render/gltf.cpp

6
inferno/src/inferno/io/gltffile.cpp

@ -10,7 +10,7 @@
namespace Inferno {
std::pair<std::shared_ptr<char[]>, std::shared_ptr<char[]>> GlTFFile::read(const std::string& path)
std::pair<std::shared_ptr<char[]>, std::shared_ptr<char[]>> GltfFile::read(const std::string& path)
{
std::string extension = path.substr(path.find_first_of("."));
@ -24,7 +24,7 @@ namespace Inferno {
return {};
}
std::pair<std::shared_ptr<char[]>, std::shared_ptr<char[]>> GlTFFile::glb(const std::string& path)
std::pair<std::shared_ptr<char[]>, std::shared_ptr<char[]>> GltfFile::glb(const std::string& path)
{
// Create input stream object and open file
std::ifstream glb(path, std::ios::in | std::ios::binary);
@ -73,7 +73,7 @@ namespace Inferno {
return { jsonChunk.first, binaryChunk.first };
}
std::pair<std::shared_ptr<char[]>, uint32_t> GlTFFile::readChunk(std::ifstream& ifstream, uint32_t offset, uint32_t type)
std::pair<std::shared_ptr<char[]>, uint32_t> GltfFile::readChunk(std::ifstream& ifstream, uint32_t offset, uint32_t type)
{
constexpr uint32_t size = 4;

2
inferno/src/inferno/io/gltffile.h

@ -8,7 +8,7 @@
namespace Inferno {
class GlTFFile {
class GltfFile {
public:
static std::pair<std::shared_ptr<char[]>, std::shared_ptr<char[]>> read(const std::string& path);

2
inferno/src/inferno/render/gltf.cpp

@ -12,7 +12,7 @@ namespace Inferno {
Gltf::Gltf(const std::string& path)
: m_path(path)
{
auto gltf = GlTFFile::read(path);
auto gltf = GltfFile::read(path);
ASSERT(gltf.first && gltf.second, "GlTF model was incomplete '{}'", path);
json json = json::parse(gltf.first.get());

Loading…
Cancel
Save