Skip to content

Commit 5f3bc0f

Browse files
authored
Update width and height consistently in MslRenderer::setSize (#2306)
In the `MslRenderer::setSize`, if the `_framebuffer` already existed, the `_width` and `_height` haven't been updated.
1 parent ab41294 commit 5f3bc0f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/MaterialXRenderMsl/MslRenderer.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@
139139

140140
void MslRenderer::setSize(unsigned int width, unsigned int height)
141141
{
142+
_width = width;
143+
_height = height;
142144
if (_framebuffer)
143145
{
144146
_framebuffer->resize(width, height);
145147
}
146148
else
147149
{
148-
_width = width;
149-
_height = height;
150150
createFrameBuffer(true);
151151
}
152152
}

0 commit comments

Comments
 (0)