Skip to content

Commit

Permalink
cleanup textures
Browse files Browse the repository at this point in the history
  • Loading branch information
iaomw committed Jun 17, 2024
1 parent 994454e commit 1facdc0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions zenovis/xinxinoptix/optixPathTracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3977,11 +3977,12 @@ void optixCleanup() {
state.params.sky_strength = 1.0f;
state.params.sky_texture;

auto sky_path = OptixUtil::default_sky_tex;
auto sky_tex = OptixUtil::g_tex[sky_path];

OptixUtil::g_tex = { {sky_path, sky_tex} };
//OptixUtil::g_tex.at(sky_path) = sky_tex;
for (auto& [k, v] : OptixUtil::g_tex) {
if (k != OptixUtil::default_sky_tex) {
OptixUtil::removeTexture(k);
}
}

OptixUtil::sky_tex = OptixUtil::default_sky_tex;
}

Expand Down

0 comments on commit 1facdc0

Please sign in to comment.