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

comply with new OQN API #2676

Closed
wants to merge 1 commit into from
Closed

Conversation

mp3butcher
Copy link
Contributor

No description provided.

@AnyOldName3
Copy link
Member

@@ -557,27 +558,33 @@ class Sun : public CelestialBody
{
osg::ref_ptr<osg::OcclusionQueryNode> oqn = new osg::OcclusionQueryNode;
oqn->setQueriesEnabled(true);

#if OSG_VERSION_LESS_THAN(3,6,5)
osg::Geometry* queryGeom = oqn->getQueryGeometry();
Copy link
Member

Choose a reason for hiding this comment

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

Always ref_ptr OSG stuff. Even if it's perfectly safe here, it's safer if other people start changing things later.

Comment on lines 581 to 584
// Hack to disable unwanted awful code inside OcclusionQueryNode::computeBound.
oqn->setComputeBoundingSphereCallback(new DummyComputeBoundCallback);
// Still need a proper bounding sphere.
oqn->setInitialBound(queryGeom->getBound());
Copy link
Member

Choose a reason for hiding this comment

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

Are these definitely safe to remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just get back to what the code...sorry for previous noise
removing these line is more than safe, it gives better result: glow don't take few frame to display when sun enter frustum

@mp3butcher mp3butcher closed this Feb 22, 2020
@mp3butcher mp3butcher reopened this Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants