Skip to content

Commit

Permalink
Merge pull request #825 from rolandhill/scale_rect
Browse files Browse the repository at this point in the history
Prevent Scissor being rescaled multiple times if camera shared by multiple views.
  • Loading branch information
robertosfield authored May 21, 2023
2 parents 84d9385 + 1d2a288 commit a72c195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vsg/app/WindowResizeHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void WindowResizeHandler::apply(vsg::View& view)
bool renderAreaMatches = (renderArea.offset.x == scissor.offset.x) && (renderArea.offset.y == scissor.offset.y) &&
(renderArea.extent.width == scissor.extent.width) && (renderArea.extent.height == scissor.extent.height);

scale_rect(scissor);
if(new_extent != scissor.extent) scale_rect(scissor);

viewport.x = static_cast<float>(scissor.offset.x);
viewport.y = static_cast<float>(scissor.offset.y);
Expand Down

0 comments on commit a72c195

Please sign in to comment.