MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / save

Function save

tests/mesh/test-texture-manager.cpp:87–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void save( const geode::TextureStorage2D& storage, std::string_view filename )
88{
89 std::ofstream file{ geode::to_string( filename ), std::ofstream::binary };
90 geode::TContext context{};
91 geode::register_basic_serialize_pcontext( std::get< 0 >( context ) );
92 geode::register_geometry_serialize_pcontext( std::get< 0 >( context ) );
93 geode::register_image_serialize_pcontext( std::get< 0 >( context ) );
94 geode::register_mesh_serialize_pcontext( std::get< 0 >( context ) );
95 geode::Serializer archive{ context, file };
96 archive.object( storage );
97 archive.adapter().flush();
98 geode::OpenGeodeMeshException::test( std::get< 1 >( context ).isValid(),
99 "[Bitsery::write] Error while writing file: ", filename );
100}
101
102geode::TextureStorage2D load( std::string_view filename )
103{

Callers 1

testFunction · 0.85

Calls 6

to_stringFunction · 0.85
testFunction · 0.70

Tested by

no test coverage detected