fixes
This commit is contained in:
42
include/assets/data_loaders/obj_loader.hpp
Executable file
42
include/assets/data_loaders/obj_loader.hpp
Executable file
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <system_error>
|
||||
#include <string_view>
|
||||
#include "assets/dynamic_data_loaders/dynamic_material_loader.hpp"
|
||||
#include "assets/dynamic_data_stores/dynamic_mesh_store.hpp"
|
||||
#include "assets/prefetch_lookup.hpp"
|
||||
|
||||
namespace obj_loader_error {
|
||||
|
||||
enum class codes {
|
||||
ok = 0,
|
||||
obj_cannot_open_file,
|
||||
obj_malformed_vertex,
|
||||
obj_malformed_texture_coordinate,
|
||||
obj_malformed_normal,
|
||||
obj_malformed_face,
|
||||
obj_face_index_out_of_range,
|
||||
obj_unknown_line_begin
|
||||
};
|
||||
|
||||
} // namespace obj_loader_error
|
||||
|
||||
struct obj_loader {
|
||||
|
||||
static constexpr auto name = std::string_view("obj");
|
||||
|
||||
[[nodiscard]] static std::error_code prefetch(
|
||||
const file_dir_list& paths,
|
||||
prefetch_queue& queue
|
||||
);
|
||||
|
||||
[[nodiscard]] static std::error_code load(
|
||||
components::mesh_vertex::flags enabled_components,
|
||||
dynamic_mesh_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_data_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user