summaryrefslogtreecommitdiffstats
path: root/tools/render-test/render.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2018-05-04 12:00:53 -0400
committerTim Foley <tfoleyNV@users.noreply.github.com>2018-05-04 09:00:53 -0700
commitee47232fc17f31ef2bd95ca480372216a79def56 (patch)
tree75d1fdd76e2ed4e081699aaae8b6df819f181260 /tools/render-test/render.h
parent494330d4941ccaf50e07ef309fd783c2f44a492e (diff)
Use Surface for screen capture in Renderer interface (#551)
* Remove serialization of screen captures from a renderer implementation, capture now writes to a Surface. Then client code can decide to serialize (or use as needed). * Improved comment for captureScreenSurface.
Diffstat (limited to 'tools/render-test/render.h')
-rw-r--r--tools/render-test/render.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/render-test/render.h b/tools/render-test/render.h
index ba76f795d..f66454712 100644
--- a/tools/render-test/render.h
+++ b/tools/render-test/render.h
@@ -15,6 +15,9 @@ namespace renderer_test {
typedef intptr_t Int;
typedef uintptr_t UInt;
+// pre declare types
+class Surface;
+
// Declare opaque type
class InputLayout: public Slang::RefObject
{
@@ -552,7 +555,8 @@ public:
/// Create a buffer resource
virtual BufferResource* createBufferResource(Resource::Usage initialUsage, const BufferResource::Desc& desc, const void* initData = nullptr) { return nullptr; }
- virtual SlangResult captureScreenShot(const char* outputPath) = 0;
+ /// Captures the back buffer and stores the result in surfaceOut. If the surface contains data - it will either be overwritten (if same size and format), or freed and a re-allocated.
+ virtual SlangResult captureScreenSurface(Surface& surfaceOut) = 0;
virtual InputLayout* createInputLayout(const InputElementDesc* inputElements, UInt inputElementCount) = 0;
virtual BindingState* createBindingState(const BindingState::Desc& desc) { return nullptr; }