From c93cf718d2321c7cb59b854403ab2a9d098de27d Mon Sep 17 00:00:00 2001 From: iaomw Date: Wed, 28 Aug 2024 20:34:00 +0800 Subject: [PATCH] fix windows build --- zenovis/src/optx/RenderEngineOptx.cpp | 4 ++-- zenovis/xinxinoptix/hair/Hair.h | 4 ++++ zenovis/xinxinoptix/hair/optixHair.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/zenovis/src/optx/RenderEngineOptx.cpp b/zenovis/src/optx/RenderEngineOptx.cpp index 0b3a5867ce..1a0456e0d6 100644 --- a/zenovis/src/optx/RenderEngineOptx.cpp +++ b/zenovis/src/optx/RenderEngineOptx.cpp @@ -226,8 +226,8 @@ struct GraphicsManager { std::vector dummy {}; auto& normals = prim_in->verts.has_attr("v") ? reinterpret_cast&>(prim_in->verts.attr("v")) : dummy; - auto& points = reinterpret_cast&>(pointArray); - auto& widths = reinterpret_cast&>(widthArray); + auto& points = reinterpret_cast&>(pointArray); + auto& widths = reinterpret_cast&>(widthArray); std::vector strands {}; strands.push_back(prim_in->lines[0][0]); diff --git a/zenovis/xinxinoptix/hair/Hair.h b/zenovis/xinxinoptix/hair/Hair.h index 4164626118..319e99c73e 100644 --- a/zenovis/xinxinoptix/hair/Hair.h +++ b/zenovis/xinxinoptix/hair/Hair.h @@ -39,6 +39,10 @@ #include #include +#if !defined(uint) +using uint = unsigned int; +#endif + static const std::map CURVE_TYPE_MAP { { zeno::CurveType::QUADRATIC_BSPLINE, OPTIX_PRIMITIVE_TYPE_ROUND_QUADRATIC_BSPLINE }, diff --git a/zenovis/xinxinoptix/hair/optixHair.h b/zenovis/xinxinoptix/hair/optixHair.h index bd843e04b1..45da546183 100644 --- a/zenovis/xinxinoptix/hair/optixHair.h +++ b/zenovis/xinxinoptix/hair/optixHair.h @@ -172,7 +172,7 @@ inline void prepareHairs(OptixDeviceContext context) { inline std::vector> curveGroupCache; inline std::vector> curveGroupStateCache; -inline void loadCurveGroup(const std::vector& points, const std::vector& widths, const std::vector& normals, const std::vector& strands, +inline void loadCurveGroup(std::vector& points, std::vector& widths, std::vector& normals, std::vector& strands, zeno::CurveType curveType, std::string mtlid) { auto cg = std::make_shared();