Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
iaomw committed Aug 28, 2024
1 parent 38f98fd commit c93cf71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions zenovis/src/optx/RenderEngineOptx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ struct GraphicsManager {
std::vector<float3> dummy {};

auto& normals = prim_in->verts.has_attr("v") ? reinterpret_cast<std::vector<float3>&>(prim_in->verts.attr("v")) : dummy;
auto& points = reinterpret_cast<const std::vector<float3>&>(pointArray);
auto& widths = reinterpret_cast<const std::vector<float>&>(widthArray);
auto& points = reinterpret_cast<std::vector<float3>&>(pointArray);
auto& widths = reinterpret_cast<std::vector<float>&>(widthArray);

std::vector<uint> strands {};
strands.push_back(prim_in->lines[0][0]);
Expand Down
4 changes: 4 additions & 0 deletions zenovis/xinxinoptix/hair/Hair.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
#include <ostream>
#include <filesystem>

#if !defined(uint)
using uint = unsigned int;
#endif

static const std::map<zeno::CurveType, OptixPrimitiveType> CURVE_TYPE_MAP {

{ zeno::CurveType::QUADRATIC_BSPLINE, OPTIX_PRIMITIVE_TYPE_ROUND_QUADRATIC_BSPLINE },
Expand Down
2 changes: 1 addition & 1 deletion zenovis/xinxinoptix/hair/optixHair.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ inline void prepareHairs(OptixDeviceContext context) {
inline std::vector<std::shared_ptr<CurveGroup>> curveGroupCache;
inline std::vector<std::shared_ptr<HairState>> curveGroupStateCache;

inline void loadCurveGroup(const std::vector<float3>& points, const std::vector<float>& widths, const std::vector<float3>& normals, const std::vector<uint>& strands,
inline void loadCurveGroup(std::vector<float3>& points, std::vector<float>& widths, std::vector<float3>& normals, std::vector<uint>& strands,
zeno::CurveType curveType, std::string mtlid) {

auto cg = std::make_shared<CurveGroup>();
Expand Down

0 comments on commit c93cf71

Please sign in to comment.