| 85 | } |
| 86 | |
| 87 | void 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 | |
| 102 | geode::TextureStorage2D load( std::string_view filename ) |
| 103 | { |
no test coverage detected