diff --git a/src/testrender/optixraytracer.cpp b/src/testrender/optixraytracer.cpp index 97612baf6..98c6ff191 100644 --- a/src/testrender/optixraytracer.cpp +++ b/src/testrender/optixraytracer.cpp @@ -1253,7 +1253,7 @@ OptixRaytracer::finalize_pixel_buffer() void OptixRaytracer::clear() { - shaders().clear(); + SimpleRaytracer::clear(); OPTIX_CHECK(optixDeviceContextDestroy(m_optix_ctx)); m_optix_ctx = 0; } diff --git a/src/testrender/simpleraytracer.cpp b/src/testrender/simpleraytracer.cpp index d9ae68063..13c92b88f 100644 --- a/src/testrender/simpleraytracer.cpp +++ b/src/testrender/simpleraytracer.cpp @@ -1101,4 +1101,10 @@ SimpleRaytracer::render(int xres, int yres) +void +SimpleRaytracer::clear() +{ + shaders().clear(); +} + OSL_NAMESPACE_EXIT diff --git a/src/testrender/simpleraytracer.h b/src/testrender/simpleraytracer.h index fbddf68c5..e9cae486b 100644 --- a/src/testrender/simpleraytracer.h +++ b/src/testrender/simpleraytracer.h @@ -82,7 +82,7 @@ class SimpleRaytracer : public RendererServices { virtual void prepare_render(); virtual void warmup() {} virtual void render(int xres, int yres); - virtual void clear() {} + virtual void clear(); // After render, get the pixels into pixelbuf, if they aren't already. virtual void finalize_pixel_buffer() {} diff --git a/src/testrender/testrender.cpp b/src/testrender/testrender.cpp index b6e24aa74..aa807953e 100644 --- a/src/testrender/testrender.cpp +++ b/src/testrender/testrender.cpp @@ -368,7 +368,7 @@ main(int argc, const char* argv[]) // We're done with the shading system now, destroy it rend->clear(); - delete rend; delete shadingsys; + delete rend; return EXIT_SUCCESS; }