-
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
Add support for dynamic plugin loading #349
Conversation
3e2b756
to
89c29d4
Compare
bcfdb1d
to
0e98ff2
Compare
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.
+1, really nice. I like the fact that only a single C function is required in the plugin and it just works with the ospray mechanism, which avoids an extra dependency for now.
brayns/CMakeLists.txt
Outdated
@@ -7,13 +7,15 @@ | |||
add_subdirectory(parameters) | |||
add_subdirectory(common) | |||
add_subdirectory(io) | |||
add_subdirectory(plugin) |
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.
pluginapi to match lib name?
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.
sure, I renamed it later and noticed we already have pluginS for the built-in ones
tests/braynsTestData.cpp
Outdated
"stereo"}; | ||
const char* argv[] = { | ||
app, "--synchronous-mode", "on", "--accumulation", "off", | ||
"--pdb-file", pdbFile.c_str(), "--camera", "stereo"}; |
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.
cleanup whitespaces
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.
damn clangformat. It shouldn't be my job :(
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.
Can't do it. clangformat likes it this way
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.
Looking good overall :)
|
||
void loadPlugins() | ||
{ | ||
#ifdef BRAYNS_USE_OSPRAY |
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.
Is it a problem we need to have ospray enabled to load our plugins?
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.
Today nothing works without having ospray anyways. But for your plugins you don't need/see it. We can also use lunchbox::DSO for the library loading. Or some boost stuff.
tests/ClientServer.h
Outdated
client.notify<Params>(method, params); | ||
|
||
wsClient.process(5); | ||
for (size_t i = 0; i < 10; ++i) |
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.
Magic numbers 5 and 10? Can you define constants for that with an explicit name?
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.
no :)
No description provided.