mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 13:15:57 +00:00
Remove use of automodule in docs
* One automodule in a file for our modules is way too much, so we split it into files. Unfortunately this means that only one file can have those classes and functions be linkable from elsewhere. * Instead we bite the bullet and manually curate the items into pages, and at the same time subdivide the 'enums and data' page more which is a general readability and usability win as well. * We also add some previously not-included functions, and add a doc-build time check to ensure that functions and classes aren't omitted from the documentation in future
This commit is contained in:
@@ -477,7 +477,7 @@ void Analytics::Load()
|
||||
Analytics::db = &actualDB;
|
||||
|
||||
// find the filename where the analytics will be saved
|
||||
analyticsSaveLocation = configFilePath(lit("analytics.json"));
|
||||
analyticsSaveLocation = ConfigFilePath(lit("analytics.json"));
|
||||
|
||||
QFile f(analyticsSaveLocation);
|
||||
|
||||
|
||||
@@ -76,6 +76,16 @@ enum class KnownShaderTool : uint32_t
|
||||
|
||||
ITERABLE_OPERATORS(KnownShaderTool);
|
||||
|
||||
DOCUMENT(R"(Returns the default executable name with no suffix for a given :class:`KnownShaderTool`.
|
||||
|
||||
.. note::
|
||||
The executable name is returned with no suffix, e.g. ``foobar`` which may need a platform specific
|
||||
suffix like ``.exe`` appended.
|
||||
|
||||
:param KnownShaderTool tool: The tool to get the executable name for.
|
||||
:return: The default executable name for this tool, or an empty string if the tool is unrecognised.
|
||||
:rtype: str
|
||||
)");
|
||||
inline rdcstr ToolExecutable(KnownShaderTool tool)
|
||||
{
|
||||
if(tool == KnownShaderTool::SPIRV_Cross)
|
||||
@@ -94,6 +104,14 @@ inline rdcstr ToolExecutable(KnownShaderTool tool)
|
||||
return "";
|
||||
}
|
||||
|
||||
DOCUMENT(R"(Returns the expected default input :class:`ShaderEncoding` that a
|
||||
:class:`KnownShaderTool` expects. This may not be accurate and may be configurable depending on the
|
||||
tool.
|
||||
|
||||
:param KnownShaderTool tool: The tool to get the input encoding for.
|
||||
:return: The encoding that this tool expects as an input by default.
|
||||
:rtype: ShaderEncoding
|
||||
)");
|
||||
inline ShaderEncoding ToolInput(KnownShaderTool tool)
|
||||
{
|
||||
if(tool == KnownShaderTool::SPIRV_Cross || tool == KnownShaderTool::spirv_dis)
|
||||
@@ -110,6 +128,14 @@ inline ShaderEncoding ToolInput(KnownShaderTool tool)
|
||||
return ShaderEncoding::Unknown;
|
||||
}
|
||||
|
||||
DOCUMENT(R"(Returns the expected default output :class:`ShaderEncoding` that a
|
||||
:class:`KnownShaderTool` produces. This may not be accurate and may be configurable depending on the
|
||||
tool.
|
||||
|
||||
:param KnownShaderTool tool: The tool to get the output encoding for.
|
||||
:return: The encoding that this tool produces as an output by default.
|
||||
:rtype: ShaderEncoding
|
||||
)");
|
||||
inline ShaderEncoding ToolOutput(KnownShaderTool tool)
|
||||
{
|
||||
if(tool == KnownShaderTool::SPIRV_Cross)
|
||||
|
||||
@@ -160,7 +160,7 @@ CaptureSettings::CaptureSettings(const QVariant &v)
|
||||
numQueuedFrames = 0;
|
||||
}
|
||||
|
||||
rdcstr configFilePath(const rdcstr &filename)
|
||||
rdcstr ConfigFilePath(const rdcstr &filename)
|
||||
{
|
||||
QString path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
||||
|
||||
@@ -170,16 +170,3 @@ rdcstr configFilePath(const rdcstr &filename)
|
||||
|
||||
return QDir::cleanPath(dir.absoluteFilePath(filename));
|
||||
}
|
||||
|
||||
ICaptureContext *getCaptureContext(const QWidget *widget)
|
||||
{
|
||||
void *ctxptr = NULL;
|
||||
|
||||
while(widget && !ctxptr)
|
||||
{
|
||||
ctxptr = widget->property("ICaptureContext").value<void *>();
|
||||
widget = widget->parentWidget();
|
||||
}
|
||||
|
||||
return (ICaptureContext *)ctxptr;
|
||||
}
|
||||
|
||||
@@ -2319,28 +2319,14 @@ protected:
|
||||
|
||||
DECLARE_REFLECTION_STRUCT(ICaptureContext);
|
||||
|
||||
DOCUMENT(R"(Attempt to retrieve the capture context for a particular widget.
|
||||
|
||||
This will search up the widget heirarchy to find if a capture context is associated with this widget
|
||||
or any of its parents. Mostly useful from within widget code where a capture context can't be
|
||||
explicitly passed in.
|
||||
|
||||
This may return ``None`` if no capture context can be found.
|
||||
|
||||
:param QWidget widget: The widget to search from.
|
||||
:return: The capture context associated with this widget, if one unambiguously exists.
|
||||
:rtype: CaptureContext
|
||||
)");
|
||||
ICaptureContext *getCaptureContext(const QWidget *widget);
|
||||
|
||||
DOCUMENT(R"(Retrieve the absolute path where a given file can be stored with other application
|
||||
data.
|
||||
|
||||
:param str filename: The base filename.
|
||||
:return: The absolute path.
|
||||
:rtype: ``str``
|
||||
:rtype: str
|
||||
)");
|
||||
rdcstr configFilePath(const rdcstr &filename);
|
||||
rdcstr ConfigFilePath(const rdcstr &filename);
|
||||
|
||||
// simple helper for the common case of 'we just need to run this on the replay thread'
|
||||
#define INVOKE_MEMFN(function) \
|
||||
|
||||
Reference in New Issue
Block a user