-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the viewport of ViewportQuad is not applied #9511
Conversation
Thanks for the pull request @bbbbx!
Reviewers, don't forget to make sure that:
|
@@ -135,6 +135,7 @@ ViewportQuad.prototype.update = function (frameState) { | |||
|
|||
this._material.update(context); | |||
|
|||
this._overlayCommand.renderState = this._rs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be straightforward to test by setting the rectangle after it's been created and observing that the command's render state has the correct viewport. Something like:
it("updates rectangle", function () {
var otherRectangle = new BoundingRectangle(0, 0, 4, 4);
scene.primitives.add(viewportQuad);
scene.renderForSpecs();
viewportQuad.rectangle = otherRectangle;
scene.renderForSpecs();
expect(scene.frameState.commandList[0].renderState.viewport).toEqual(
otherRectangle
);
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I can confirm this PR fixes the bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Eli Bogomolny <[email protected]>
Thanks @bbbbx! |
fix #9167