-
-
Notifications
You must be signed in to change notification settings - Fork 314
Cli reader options #1860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Cli reader options #1860
Changes from 8 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
917db39
implemented reader option
0xfedcafe a039ed0
Merge branch 'f3d-app:master' into cli-reader-options
0xfedcafe c85a20c
added test & bugfix
0xfedcafe 45ba1a9
spelling correction
0xfedcafe 5b00fcb
reformat
0xfedcafe be829e3
Merge branch 'f3d-app:master' into cli-reader-options
0xfedcafe e916daf
force-reader to scene & fixes
0xfedcafe 17c2dda
bugfix
0xfedcafe 8e69e60
Merge branch 'f3d-app:master' into cli-reader-options
0xfedcafe bc26894
reader: Applied suggestions & refactor
0xfedcafe fc68b05
Merge branch 'master' into cli-reader-options
0xfedcafe d260c55
apllication tests for force-reader
0xfedcafe c93e954
reformat
0xfedcafe 63c0456
test fix
0xfedcafe 9a5bca2
Apply suggestions from code review
0xfedcafe 4bb1ce4
Merge branch 'master' into cli-reader-options
0xfedcafe 2db35e2
fix
0xfedcafe dbaf7ba
Removed unnecessary test
0xfedcafe d303d15
Merge branch 'f3d-app:master' into cli-reader-options
0xfedcafe cad1255
applied pr suggestions(improved error logging, corrected tests)
0xfedcafe 5cfbd98
format
0xfedcafe e25b256
added sdk test, codestyle fix
0xfedcafe 6a2dad4
Merge branch 'f3d-app:master' into cli-reader-options
0xfedcafe 7141d9e
removed has_value, added reader name field in doc, fixed missed formats
0xfedcafe 993e724
Update doc/user/OPTIONS.md
0xfedcafe 34714af
prettier
0xfedcafe 546f7ba
Merge branch 'cli-reader-options' of github.com:0xfedcafe/f3d into cl…
0xfedcafe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xfedcafe marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,9 @@ | |
"orthographic": { | ||
"type": "bool" | ||
} | ||
}, | ||
"force_reader": { | ||
"type": "string" | ||
} | ||
}, | ||
"render": { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#include "PseudoUnitTest.h" | ||
#include "TestSDKHelpers.h" | ||
|
||
#include <engine.h> | ||
#include <log.h> | ||
#include <scene.h> | ||
#include <window.h> | ||
|
||
namespace fs = std::filesystem; | ||
int TestSDKReaderSelection(int argc, char* argv[]) | ||
{ | ||
PseudoUnitTest test; | ||
|
||
f3d::log::setVerboseLevel(f3d::log::VerboseLevel::DEBUG); | ||
f3d::engine::autoloadPlugins(); | ||
|
||
// Test file path setup | ||
std::string monkey = std::string(argv[1]) + "data/red_translucent_monkey.gltf"; | ||
|
||
// Test default reader (no preference) | ||
{ | ||
f3d::engine engine = f3d::engine::create(true); | ||
f3d::scene& scene = engine.getScene(); | ||
test("add with a single path", [&]() { scene.add(fs::path(monkey)); }); | ||
} | ||
|
||
// Test Draco reader; GLTF is by-default | ||
{ | ||
f3d::engine engine = f3d::engine::create(true); | ||
engine.getOptions().scene.force_reader = "GLTFDraco"; | ||
f3d::scene& scene = engine.getScene(); | ||
test("Draco reader works", [&]() { scene.add(fs::path(monkey)); }); | ||
test("Reader is GLTFDraco", engine.getOptions().scene.force_reader == "GLTFDraco"); | ||
} | ||
|
||
// Test GLTF reader; | ||
{ | ||
f3d::engine engine = f3d::engine::create(true); | ||
engine.getOptions().scene.force_reader = "GLTF"; | ||
f3d::scene& scene = engine.getScene(); | ||
test("GLTF reader works", [&]() { scene.add(fs::path(monkey)); }); | ||
test("Reader is GLTF", engine.getOptions().scene.force_reader == "GLTF"); | ||
} | ||
return test.result(); | ||
} | ||
0xfedcafe marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.