From 242bfd475aa2207888eb8372a13afbb614ef20fb Mon Sep 17 00:00:00 2001 From: iaomw Date: Mon, 14 Oct 2024 19:35:33 +0800 Subject: [PATCH] fix ptr capture --- zenovis/xinxinoptix/OptiXStuff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zenovis/xinxinoptix/OptiXStuff.h b/zenovis/xinxinoptix/OptiXStuff.h index 7583c5c82..cd49b1356 100644 --- a/zenovis/xinxinoptix/OptiXStuff.h +++ b/zenovis/xinxinoptix/OptiXStuff.h @@ -1010,7 +1010,7 @@ inline void addTexture(std::string path, bool blockCompression=false, TaskType* tex_lut[tex_key] = makeCudaTexture((unsigned char *)data.data(), nx, ny, 4, blockCompression); } - lookupTexture = [&img](uint32_t idx) { + lookupTexture = [img=img](uint32_t idx) { auto ptr = (float*)img->verts->data(); return ptr[idx]; };