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

Feature Request: DLL build of Falcor #70

Closed
Alekssasho opened this issue May 15, 2018 · 4 comments
Closed

Feature Request: DLL build of Falcor #70

Alekssasho opened this issue May 15, 2018 · 4 comments

Comments

@Alekssasho
Copy link

Alekssasho commented May 15, 2018

Are there any plans for supporting a DLL build of Falcor ?

I want to do hot reloading of render loop code, so there is no need to shut down the application every time some c++ code inside the render loop is changed, as loading whole models and scene is somewhat slow, especially the ORCA scenes.
My setup is an application which has holds the Falcor::Renderer instance and is handling rendering code dll hot reloading. It is forwarding onFrameRender and onGuiRender calls to the rendering code DLL.
There is a DLL which holds function for initializing some state, and onFrameRender and onGuiRender calls which implement the main render logic.

The problem right now is Falcor is statically build and contains some globals which are not properly initialized in the DLL due to not having a Renderer instance. Also there is a duplication of all of the code that way. Having Falcor built as DLL will solve this problems and enable this workflow with hot reloading rendering code.

@nbentyNV
Copy link
Contributor

I need to fix that, but would like to keep Falcor as a static library. The usage model I have in mind is:

  • Falcor will have a DynamicRenderer sample, which is basically a simple Renderer which renders nothing except for a GUI with a Load DLL button.
  • The user implements a Renderer in a DLL which can be loaded by the sample. Once that DLL is loaded, all the callbacks will be redirected to it.
  • The DynamicRenderer renderer can hold a Scene to avoid asset reloading when switching renderers.

I'm not sure I need to change Sample since Renderer doesn't inherit from it.

@Alekssasho
Copy link
Author

So the plans are to fix all global variables so that Falcor being a statically linked can be used from both DLLs safely.
Do you have any estimate when this could happen ?

@nbentyNV
Copy link
Contributor

Hopefully this week

@Alekssasho
Copy link
Author

That sound awesome.
I will close the issue then, as there will be a solution soon.

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

No branches or pull requests

2 participants