mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-15 02:11:22 +00:00
Add process for programs to voluntarily remove renderdoc. Refs #115
* To remove renderdoc (e.g. if the API version doesn't match what is expected), user code can call RENDERDOC_Shutdown() to remove the running thread and undo any library hooks, then unload the dynamic library. * This still isn't recommended as there could be unexpected side-effects, and it will definitely break if this happens after any APIs have been initialised, but it's an option.
This commit is contained in:
1 parent
0df6e36ff5
commit
f1f72ec8ff
8 files changed
+88
-4
No files matched your search
@@ -27,6 +27,7 @@
|
||||
#include "maths/formatpacking.h"
|
||||
#include "serialise/serialiser.h"
|
||||
#include "core/core.h"
|
||||
#include "hooks/hooks.h"
|
||||
#include "replay/replay_renderer.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
@@ -90,6 +91,13 @@ int RENDERDOC_CC RENDERDOC_GetAPIVersion()
|
||||
return RENDERDOC_API_VERSION;
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API
|
||||
void RENDERDOC_CC RENDERDOC_Shutdown()
|
||||
{
|
||||
RenderDoc::Inst().Shutdown();
|
||||
LibraryHooks::GetInstance().RemoveHooks();
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API
|
||||
void RENDERDOC_CC RENDERDOC_LogText(const char *text)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user