-
Notifications
You must be signed in to change notification settings - Fork 51
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 multiple ray queries #666
Fix multiple ray queries #666
Conversation
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## hidmic/one-selection-buffer-per-camera #666 +/- ##
=======================================================================
Coverage 53.58% 53.59%
=======================================================================
Files 214 214
Lines 21421 21423 +2
=======================================================================
+ Hits 11479 11482 +3
+ Misses 9942 9941 -1
Continue to review full report at Codecov.
|
ogre2/src/Ogre2SelectionBuffer.cc
Outdated
@@ -222,18 +222,24 @@ void Ogre2SelectionBuffer::CreateRTTBuffer() | |||
|
|||
Ogre::TextureGpuManager *textureMgr = | |||
ogreRoot->getRenderSystem()->getTextureGpuManager(); | |||
std::string selectionTextureName = "SelectionPassTex"; |
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.
name is different. is this wrong ? "SelectionPassTex" + this->dataPtr->camera->getName(),
?
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.
oh that's on purpose. The idea is to use the same texture for all ray queries.
src/RayQuery_TEST.cc
Outdated
EXPECT_EQ(math::Vector3d::Zero, result2.point); | ||
EXPECT_LT(result2.distance, 0.0); | ||
EXPECT_EQ(0u, result2.objectId); | ||
EXPECT_FALSE((result2)); |
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.
EXPECT_FALSE((result2)); | |
EXPECT_FALSE(result2); |
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.
done. e9d8ea4
Signed-off-by: Ian Chen <[email protected]>
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.
warnings are unrelated to this PR
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.
@iche033 I tested this locally and it works just fine.
Thanks!
Signed-off-by: Ian Chen <[email protected]>
🦟 Bug fix
Alternative to #665
Summary
This attempts to reuse the same texture for doing ray queries via selection buffer.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.