MCPcopy Create free account
hub / github.com/crownengine/crown / parse_scene

Function parse_scene

src/resource/mesh_obj.cpp:64–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 }
63
64 static s32 parse_scene(OBJDocument &obj, Buffer &buf, CompileOptions &opts, const char *filename)
65 {
66 ufbx_load_opts load_opts = {};
67 setup_load_opts(load_opts, filename);
68
69 ufbx_error error;
70 obj.scene = ufbx_load_memory(array::begin(buf)
71 , array::size(buf)
72 , &load_opts
73 , &error
74 );
75 RETURN_IF_FALSE(OBJ_RESOURCE, obj.scene != NULL
76 , opts
77 , "ufbx: %s"
78 , error.description.data
79 );
80
81 return 0;
82 }
83
84 static void generate_indices(Array<u32> &triangle_indices, Array<f32> &vertex_data, size_t vertex_size)
85 {

Callers 1

parse_internalFunction · 0.85

Calls 4

setup_load_optsFunction · 0.85
ufbx_load_memoryFunction · 0.85
beginFunction · 0.50
sizeFunction · 0.50

Tested by

no test coverage detected