Skip to content

Conversation

@johnhaddon
Copy link
Member

These are needed by Gaffer, to allow selection wireframes to be drawn successfully without z-fighting with the underlying geometry. See GafferHQ/gaffer#5220.

These are needed by Gaffer, to allow selection wireframes to be drawn successfully without z-fighting with the underlying geometry. See GafferHQ/gaffer#5220.
Copy link
Contributor

@danieldresser-ie danieldresser-ie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see anything here to prevent merging at the moment, though I did make one comment.

return true;
}
}
return glslVersion() < 150;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks like it will work fine, but it does feel a little weird that it is so close to renderMode. Why not just call renderMode and check the "linear" return ... I guess it could be perf critical so you want to skip the basis compare? Why this check if state->get<UseGLLines>() is valid before dereferencing it, but renderMode doesn't?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it could be perf critical so you want to skip the basis compare?

Yep, that.

Why this check if state->get() is valid before dereferencing it, but renderMode doesn't?

The docs for Primitive::render() say that state must be complete, so that the get() will never return null. In practice in Gaffer the state will also be complete here, but since I didn't document that as a requirement I threw in the check.

@johnhaddon johnhaddon merged commit f19949d into ImageEngine:RB-10.4 Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants