mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 16:36:31 +00:00
Add a function to fetch the texture display config from texture viewer
This commit is contained in:
@@ -851,6 +851,13 @@ If no location is currently selected or there is no current texture, this will r
|
||||
)");
|
||||
virtual bool IsZoomAutoFit() = 0;
|
||||
|
||||
DOCUMENT(R"(Return the currently configured texture display structure.
|
||||
|
||||
:return: The current texture display.
|
||||
:rtype: renderdoc.TextureDisplay
|
||||
)");
|
||||
virtual TextureDisplay GetTextureDisplay() = 0;
|
||||
|
||||
DOCUMENT(R"(Return the current zoom level, whether manually set or auto-calculated.
|
||||
|
||||
:return: The current zoom level, with 100% being represented as 1.0.
|
||||
|
||||
@@ -964,6 +964,10 @@ struct ITextureViewerInvoker : UIThreadInvoker<ITextureViewer>
|
||||
return InvokeVoidFunction(&ITextureViewer::SetTextureOverlay, overlay);
|
||||
}
|
||||
bool IsZoomAutoFit() { return InvokeRetFunction<bool>(&ITextureViewer::IsZoomAutoFit); }
|
||||
TextureDisplay GetTextureDisplay()
|
||||
{
|
||||
return InvokeRetFunction<TextureDisplay>(&ITextureViewer::GetTextureDisplay);
|
||||
}
|
||||
float GetZoomLevel() { return InvokeRetFunction<float>(&ITextureViewer::GetZoomLevel); }
|
||||
void SetZoomLevel(bool autofit, float zoom)
|
||||
{
|
||||
|
||||
@@ -147,6 +147,7 @@ public:
|
||||
DebugOverlay GetTextureOverlay() override;
|
||||
void SetTextureOverlay(DebugOverlay overlay) override;
|
||||
|
||||
TextureDisplay GetTextureDisplay() override { return m_TexDisplay; }
|
||||
bool IsZoomAutoFit() override;
|
||||
float GetZoomLevel() override;
|
||||
void SetZoomLevel(bool autofit, float zoom) override;
|
||||
|
||||
Reference in New Issue
Block a user