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

Function parse

src/resource/mesh.cpp:552–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550 }
551
552 s32 parse(Mesh &m, const char *path, CompileOptions &opts)
553 {
554 MeshCache *cache = (MeshCache *)opts._data_compiler.user_data(RESOURCE_TYPE_MESH);
555
556 if (cache == NULL) {
557 RETURN_IF_FILE_MISSING(MESH, path, opts);
558 Buffer buf = opts.read(path);
559 return parse_internal(m, buf, opts);
560 } else {
561 s32 err = 0;
562 StringId64 path_id(path);
563 Mesh *mesh = mesh_cache::get(*cache, path);
564 if (mesh == NULL) {
565 mesh = CE_NEW(default_allocator(), Mesh)(default_allocator());
566 RETURN_IF_FILE_MISSING(MESH, path, opts);
567 Buffer buf = opts.read(path);
568 err = parse_internal(*mesh, buf, opts);
569 ENSURE_OR_RETURN(MESH, err == 0, opts);
570 mesh->_path = path_id;
571 mesh_cache::add(*cache, mesh);
572 }
573
574 m = *mesh;
575 return err;
576 }
577 }
578
579 s32 parse(Mesh &m, CompileOptions &opts)
580 {

Callers 15

parse_framesFunction · 0.70
compileFunction · 0.70
parse_texturesFunction · 0.70
parse_uniformsFunction · 0.70
compileFunction · 0.70
compileFunction · 0.70
compileFunction · 0.70
writeFunction · 0.70
parse_internalFunction · 0.70
compileFunction · 0.70
parseMethod · 0.70
parse_decl_commentMethod · 0.70

Calls 5

getFunction · 0.85
user_dataMethod · 0.80
parse_internalFunction · 0.70
addFunction · 0.70
readMethod · 0.45

Tested by

no test coverage detected