mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Add simple API version fetch function.
* Plugins/apps that build against the header (and so get the RENDERDOC_API_VERSION macro) can call this to verify that they're running against compatible API functions. If the versions don't match, the app should immediately quit.
This commit is contained in:
@@ -84,6 +84,12 @@ extern "C" RENDERDOC_API void RENDERDOC_CC Maths_CameraFPSLook(const FloatVector
|
||||
right->z = r.z;
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API
|
||||
int RENDERDOC_CC RENDERDOC_GetAPIVersion()
|
||||
{
|
||||
return RENDERDOC_API_VERSION;
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API
|
||||
void RENDERDOC_CC RENDERDOC_LogText(const wchar_t *text)
|
||||
{
|
||||
|
||||
@@ -210,6 +210,11 @@ typedef ReplayCreateStatus (RENDERDOC_CC *pRENDERDOC_CreateReplayRenderer)(const
|
||||
// Takes the filename of the log. Returns NULL in the case of any error.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define RENDERDOC_API_VERSION 1
|
||||
|
||||
extern "C" RENDERDOC_API int RENDERDOC_CC RENDERDOC_GetAPIVersion();
|
||||
typedef int (RENDERDOC_CC *pRENDERDOC_GetAPIVersion)();
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_SetLogFile(const wchar_t *logfile);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_SetLogFile)(const wchar_t *logfile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user