-
Notifications
You must be signed in to change notification settings - Fork 47
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
DeflectPlugin improvements #626
Conversation
retest this please |
_extensions.emplace_back(createFunc(argc, argv)); | ||
_libs.push_back(std::move(library)); | ||
BRAYNS_INFO << "Loaded plugin '" << name << "'" << std::endl; | ||
if (auto plugin = createFunc(argc, argv)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we print an error in the case of createFunc returning nullptr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would delegate that to createFunc. Because using exceptions in extern "C" functions is not possible, is it?
@@ -212,7 +212,7 @@ void PropertyMap::merge(const PropertyMap& input) | |||
}; | |||
}; | |||
|
|||
const auto isCompatbileTypes = [](Property::Type t0, Property::Type t1) { | |||
const auto areCompatibleTypes = [](Property::Type t0, Property::Type t1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const auto canBePromoted = [](Property::Type from, Property::Type to)
From the name is not clear in which order the conversion is allowed.
6e86043
to
2de9942
Compare
- independent from core, all Deflect related code moved to the plugin - move DeflectPixelOp into the plugin, --use-pixelop activates it - commandline for the plugin handles --help to learn about the options - add top-down option and yuv modes to the parameters for cmdline and JSON
2de9942
to
b9ec18c
Compare
@@ -212,7 +212,7 @@ void PropertyMap::merge(const PropertyMap& input) | |||
}; | |||
}; | |||
|
|||
const auto isCompatbileTypes = [](Property::Type t0, Property::Type t1) { | |||
const auto areCompatibleTypes = [](Property::Type t0, Property::Type t1) { | |||
return (t0 == Property::Type::Int && t1 == Property::Type::Double) || | |||
(t0 == Property::Type::Double && t1 == Property::Type::Int) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This conversion should not be allowed @karjonas, any reason for allowing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we get doubles from the UI they are sent as 0
instead of 0.0
so therefore we need to be able to convert between double and float.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that would be a type promotion, which is fine. The condition is also accepting type demotion (accepting double for an integer), which is what I don't see why should be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, should be fine, you just need to change the order in the jsonToPropertyMap method in jsonPropertyMap.h.
No description provided.