Print custom lines of API support on the version string of renderdoccmd

* An easy way to check what support is compiled into this binary.
This commit is contained in:
baldurk
2016-08-25 12:57:17 +02:00
parent 6819f22181
commit 90604c6d9c
5 changed files with 83 additions and 7 deletions
+60 -2
View File
@@ -238,9 +238,67 @@ int main(int argc, char *argv[])
signal(SIGINT, sig_handler);
signal(SIGTERM, sig_handler);
// do any linux-specific setup here
// add compiled-in support to version line
{
string support = "APIs supported at compile-time: ";
int count = 0;
// process any linux-specific arguments here
#if defined(RENDERDOC_SUPPORT_VULKAN)
support += "Vulkan, ";
count++;
#endif
#if defined(RENDERDOC_SUPPORT_GL)
support += "GL, ";
count++;
#endif
if(count == 0)
{
support += "None.";
}
else
{
// remove trailing ', '
support.pop_back();
support.pop_back();
support += ".";
}
add_version_line(support);
support = "Windowing systems supported at compile-time: ";
count = 0;
#if defined(RENDERDOC_WINDOWING_XLIB)
support += "xlib, ";
count++;
#endif
#if defined(RENDERDOC_WINDOWING_XCB)
support += "XCB, ";
count++;
#endif
#if defined(RENDERDOC_SUPPORT_VULKAN)
support += "Vulkan KHR_display, ";
count++;
#endif
if(count == 0)
{
support += "None.";
}
else
{
// remove trailing ', '
support.pop_back();
support.pop_back();
support += ".";
}
add_version_line(support);
}
return renderdoccmd(argc, argv);
}