Skip to content
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

Merged
merged 2 commits into from
Mar 13, 2018

Conversation

tribal-tec
Copy link
Contributor

No description provided.

Copy link

@rdumusc rdumusc left a 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.

@@ -7,13 +7,15 @@
add_subdirectory(parameters)
add_subdirectory(common)
add_subdirectory(io)
add_subdirectory(plugin)
Copy link

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?

Copy link
Contributor Author

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

"stereo"};
const char* argv[] = {
app, "--synchronous-mode", "on", "--accumulation", "off",
"--pdb-file", pdbFile.c_str(), "--camera", "stereo"};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanup whitespaces

Copy link
Contributor Author

@tribal-tec tribal-tec Mar 13, 2018

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 :(

Copy link
Contributor Author

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

Copy link
Contributor

@karjonas karjonas left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

client.notify<Params>(method, params);

wsClient.process(5);
for (size_t i = 0; i < 10; ++i)
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants