Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
iaomw committed Sep 20, 2024
1 parent ad38882 commit c1933b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zenovis/xinxinoptix/optixPathTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2521,7 +2521,7 @@ static void updateStaticDrawObjects() {

auto& dat = *dat_ptr;

std::vector<uint32_t> global_matidx(dat.mtlidList.size());
std::vector<uint32_t> global_matidx(max(dat.mtlidList.size(), 1ull));

for (size_t j=0; j<dat.mtlidList.size(); ++j) {
auto matName = dat.mtlidList[j];
Expand Down Expand Up @@ -2578,7 +2578,7 @@ static void updateDynamicDrawObjects() {
mesh = std::make_shared<smallMesh>();
mesh->resize(dat.tris.size()/3, dat.verts.size()/3);

std::vector<uint32_t> global_matidx(max(dat.mtlidList.size(), 1));
std::vector<uint32_t> global_matidx(max(dat.mtlidList.size(), 1ull));

for (size_t j=0; j<dat.mtlidList.size(); ++j) {
auto matName = dat.mtlidList[j];
Expand Down Expand Up @@ -2658,7 +2658,7 @@ static void updateInstObjects()
auto &instData = g_instLUT[dat.instID];
auto &mesh_ref = instData.mesh;

std::vector<uint32_t> global_matidx(dat.mtlidList.size());
std::vector<uint32_t> global_matidx(max(dat.mtlidList.size(), 1ull));

for (size_t j=0; j<dat.mtlidList.size(); ++j) {
auto matName = dat.mtlidList[j];
Expand Down

0 comments on commit c1933b9

Please sign in to comment.