File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1252,7 +1252,12 @@ OptixRaytracer::finalize_pixel_buffer()
12521252 reinterpret_cast <void *>(d_output_buffer),
12531253 m_xres * m_yres * 3 * sizeof (float ),
12541254 cudaMemcpyDeviceToHost));
1255+ #ifdef OIIO_VERSION_GREATER_EQUAL(3,1,0)
1256+ pixelbuf.set_pixels (OIIO::ROI::All (), OIIO::TypeFloat,
1257+ OIIO::make_cspan (tmp_buff));
1258+ #else
12551259 pixelbuf.set_pixels (OIIO::ROI::All (), OIIO::TypeFloat, tmp_buff.data ());
1260+ #endif
12561261}
12571262
12581263
Original file line number Diff line number Diff line change @@ -1088,8 +1088,14 @@ OptixGridRenderer::finalize_pixel_buffer()
10881088 m_xres * m_yres * 3 * sizeof (float ),
10891089 cudaMemcpyDeviceToHost));
10901090 OIIO::ImageBuf* buf = outputbuf (0 );
1091- if (buf)
1091+ if (buf) {
1092+ #ifdef OIIO_VERSION_GREATER_EQUAL(3,1,0)
1093+ buf->set_pixels (OIIO::ROI::All (), OIIO::TypeFloat,
1094+ OIIO::make_cspan (tmp_buff));
1095+ #else
10921096 buf->set_pixels (OIIO::ROI::All (), OIIO::TypeFloat, tmp_buff.data ());
1097+ #endif
1098+ }
10931099}
10941100
10951101
You can’t perform that action at this time.
0 commit comments