chore: add output implementations for gltf and glb

This commit is contained in:
Jan
2024-03-31 22:46:31 +02:00
parent 7a0930a208
commit c27f4ed544
7 changed files with 228 additions and 0 deletions

View File

@ -0,0 +1,25 @@
#pragma once
#include <nlohmann/json_fwd.hpp>
#include <optional>
#include <string>
namespace gltf
{
class Output
{
protected:
Output() = default;
virtual ~Output() = default;
Output(const Output& other) = default;
Output(Output&& other) noexcept = default;
Output& operator=(const Output& other) = default;
Output& operator=(Output&& other) noexcept = default;
public:
virtual std::optional<std::string> CreateBufferUri(const void* buffer, size_t bufferSize) const = 0;
virtual void EmitJson(const nlohmann::json& json) const = 0;
virtual void EmitBuffer(const void* buffer, size_t bufferSize) const = 0;
virtual void Finalize() const = 0;
};
} // namespace gltf