diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-05-20 21:50:53 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-20 22:22:56 +0200 |
commit | 2a16c8bdb8b285209950a4e26b3eee1d95ec1a7a (patch) | |
tree | 65c2f48a960f161401d248e4982692c066205308 /Userland/Applications/3DFileViewer/WavefrontOBJLoader.h | |
parent | 728e6dad7306b2aceff46b19491346e49b0bba15 (diff) | |
download | serenity-2a16c8bdb8b285209950a4e26b3eee1d95ec1a7a.zip |
3DFileViewer: Clean up file handling
This unifies how 3DFileViewer handles the initial file when starting
the application and when opening files later on via the menu.
Errors are shown both for the initial load as well as when loading
files later on. An error during file load no longer clears the
existing model.
It also adds support for specifying the filename as a command-line
argument.
The opened file's name is shown in the titlebar.
Diffstat (limited to 'Userland/Applications/3DFileViewer/WavefrontOBJLoader.h')
-rw-r--r-- | Userland/Applications/3DFileViewer/WavefrontOBJLoader.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/3DFileViewer/WavefrontOBJLoader.h b/Userland/Applications/3DFileViewer/WavefrontOBJLoader.h index 92ef601577..afebce1384 100644 --- a/Userland/Applications/3DFileViewer/WavefrontOBJLoader.h +++ b/Userland/Applications/3DFileViewer/WavefrontOBJLoader.h @@ -12,10 +12,10 @@ #include "Mesh.h" #include "MeshLoader.h" -class WavefrontOBJLoader : public MeshLoader { +class WavefrontOBJLoader final : public MeshLoader { public: WavefrontOBJLoader() { } ~WavefrontOBJLoader() override { } - RefPtr<Mesh> load(const String& fname) override; + RefPtr<Mesh> load(Core::File& file) override; }; |