Skip to content
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

MAYA-125723 - Implement display layer's bbox mode for instanced geometry #2709

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

vlasovi
Copy link
Collaborator

@vlasovi vlasovi commented Nov 8, 2022

No description provided.

…he use of the newly introduced, internal representation forcedBBox
{
ReprVector::const_iterator it
= std::find_if(reprs.begin(), reprs.end(), [reprToken](ReprVector::const_reference e) {
return reprToken == e.first;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose the vector is not sorted so std::binary_search cannot be used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Those are stored in an RPrim and managed by Hydra. They are not sorted.


// Instanced primitives with instances in display layers use 'forced' representations to
// draw those specific instances, so the 'forced' representations should be inited alongside
if (reprToken != HdVP2ReprTokens->forcedBbox) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

inited -> initialized, but not worth making a new commit just for that.

return reprToken == e.first;
});
HdReprSharedPtr curRepr = (it != reprs.end() ? it->second : nullptr);
// Find the current representation in the array of all inited representations
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same inited -> initialized, again not worth a commit.

HdSceneDelegate* delegate,
HdRenderParam* renderParam,
HdDirtyBits* dirtyBits,
ReprVector const& reprs);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like to have some docs/comment that explain what each function does and why. I guess it falls into a larger scope of documenting how the render delegates work.

@vlasovi vlasovi added vp2renderdelegate Related to VP2RenderDelegate ready-for-merge Development process is finished, PR is ready for merge labels Nov 9, 2022
@seando-adsk seando-adsk merged commit 50b9dde into dev Nov 9, 2022
@seando-adsk seando-adsk deleted the vlasovi/MAYA-125723 branch November 9, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge vp2renderdelegate Related to VP2RenderDelegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants