mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
LP-410 silence osg log output
This commit is contained in:
parent
a8f09d277e
commit
7e99441005
@ -97,7 +97,7 @@ public:
|
||||
void updateClearColor()
|
||||
{
|
||||
if (!camera.valid()) {
|
||||
qDebug() << "OSGCamera::updateClearColor - invalid camera";
|
||||
qWarning() << "OSGCamera::updateClearColor - invalid camera";
|
||||
return;
|
||||
}
|
||||
// qDebug() << "OSGCamera::updateClearColor" << clearColor;
|
||||
@ -107,11 +107,11 @@ public:
|
||||
void updateFieldOfView()
|
||||
{
|
||||
if (!camera.valid()) {
|
||||
qDebug() << "OSGCamera::updateFieldOfView - invalid camera";
|
||||
qWarning() << "OSGCamera::updateFieldOfView - invalid camera";
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << "OSGCamera::updateFieldOfView" << fieldOfView;
|
||||
// qDebug() << "OSGCamera::updateFieldOfView" << fieldOfView;
|
||||
|
||||
double fovy, ar, zn, zf;
|
||||
camera->getProjectionMatrixAsPerspective(fovy, ar, zn, zf);
|
||||
@ -122,18 +122,18 @@ public:
|
||||
void updateAspectRatio()
|
||||
{
|
||||
if (!camera.valid()) {
|
||||
qDebug() << "OSGCamera::updateAspectRatio - invalid camera";
|
||||
qWarning() << "OSGCamera::updateAspectRatio - invalid camera";
|
||||
return;
|
||||
}
|
||||
osg::Viewport *viewport = camera->getViewport();
|
||||
if (!viewport) {
|
||||
qDebug() << "OSGCamera::updateAspectRatio - no viewport" << viewport;
|
||||
qWarning() << "OSGCamera::updateAspectRatio - no viewport" << viewport;
|
||||
return;
|
||||
}
|
||||
|
||||
double aspectRatio = static_cast<double>(viewport->width()) / static_cast<double>(viewport->height());
|
||||
|
||||
qDebug() << "OSGCamera::updateAspectRatio" << aspectRatio;
|
||||
// qDebug() << "OSGCamera::updateAspectRatio" << aspectRatio;
|
||||
|
||||
double fovy, ar, zn, zf;
|
||||
camera->getProjectionMatrixAsPerspective(fovy, ar, zn, zf);
|
||||
@ -152,12 +152,12 @@ public:
|
||||
#ifdef USE_OSGEARTH
|
||||
// install log depth buffer if requested
|
||||
if (logDepthBufferEnabled && !logDepthBuffer) {
|
||||
qDebug() << "OSGCamera::updateLogDepthBuffer - installing logarithmic depth buffer";
|
||||
// qDebug() << "OSGCamera::updateLogDepthBuffer - installing logarithmic depth buffer";
|
||||
logDepthBuffer = new osgEarth::Util::LogarithmicDepthBuffer();
|
||||
logDepthBuffer->setUseFragDepth(true);
|
||||
logDepthBuffer->install(camera);
|
||||
} else if (!logDepthBufferEnabled && logDepthBuffer) {
|
||||
qDebug() << "OSGCamera::updateLogDepthBuffer - uninstalling logarithmic depth buffer";
|
||||
// qDebug() << "OSGCamera::updateLogDepthBuffer - uninstalling logarithmic depth buffer";
|
||||
logDepthBuffer->uninstall(camera);
|
||||
delete logDepthBuffer;
|
||||
logDepthBuffer = NULL;
|
||||
@ -168,11 +168,11 @@ public:
|
||||
void setGraphicsContext(osg::GraphicsContext *gc)
|
||||
{
|
||||
if (!camera.valid()) {
|
||||
qDebug() << "OSGCamera::setGraphicsContext - invalid camera";
|
||||
qWarning() << "OSGCamera::setGraphicsContext - invalid camera";
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << "OSGCamera::setGraphicsContext" << gc;
|
||||
// qDebug() << "OSGCamera::setGraphicsContext" << gc;
|
||||
|
||||
camera->setGraphicsContext(gc);
|
||||
camera->setViewport(0, 0, gc->getTraits()->width, gc->getTraits()->height);
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
|
||||
void updateSource()
|
||||
{
|
||||
qDebug() << "OSGFileNode::updateNode" << source;
|
||||
// qDebug() << "OSGFileNode::updateNode" << source;
|
||||
if (!source.isValid()) {
|
||||
self->setNode(NULL);
|
||||
if (!source.isEmpty()) {
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
|
||||
bool acceptSceneNode(OSGNode *node)
|
||||
{
|
||||
qDebug() << "OSGGeoTransformNode::acceptSceneNode" << node;
|
||||
// qDebug() << "OSGGeoTransformNode::acceptSceneNode" << node;
|
||||
if (sceneNode == node) {
|
||||
return false;
|
||||
}
|
||||
@ -92,7 +92,7 @@ public:
|
||||
|
||||
void updateSceneNode()
|
||||
{
|
||||
qDebug() << "OSGGeoTransformNode::updateSceneNode" << sceneNode;
|
||||
// qDebug() << "OSGGeoTransformNode::updateSceneNode" << sceneNode;
|
||||
if (sceneNode && sceneNode->node()) {
|
||||
osgEarth::MapNode *mapNode = osgEarth::MapNode::findMapNode(sceneNode->node());
|
||||
if (mapNode) {
|
||||
@ -148,7 +148,7 @@ public:
|
||||
private slots:
|
||||
void onSceneNodeChanged(osg::Node *node)
|
||||
{
|
||||
qDebug() << "OSGGeoTransformNode::onSceneNodeChanged" << node;
|
||||
// qDebug() << "OSGGeoTransformNode::onSceneNodeChanged" << node;
|
||||
updateSceneNode();
|
||||
updatePosition();
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
|
||||
void updateChildren()
|
||||
{
|
||||
qDebug() << "OSGGroup::updateChildren";
|
||||
// qDebug() << "OSGGroup::updateChildren";
|
||||
|
||||
osg::Group *group = static_cast<osg::Group *>(self->node());
|
||||
if (!group) {
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
|
||||
bool acceptSceneNode(OSGNode *node)
|
||||
{
|
||||
qDebug() << "OSGSkyNode::acceptSceneNode" << node;
|
||||
// qDebug() << "OSGSkyNode::acceptSceneNode" << node;
|
||||
if (sceneNode == node) {
|
||||
return false;
|
||||
}
|
||||
@ -95,7 +95,7 @@ public:
|
||||
self->setNode(NULL);
|
||||
return;
|
||||
}
|
||||
qDebug() << "OSGSkyNode::updateScene - scene node" << sceneNode->node();
|
||||
// qDebug() << "OSGSkyNode::updateScene - scene node" << sceneNode->node();
|
||||
osgEarth::MapNode *mapNode = osgEarth::MapNode::findMapNode(sceneNode->node());
|
||||
if (!mapNode) {
|
||||
qWarning() << "OSGSkyNode::updateScene - scene node does not contain a map node";
|
||||
@ -151,12 +151,12 @@ public:
|
||||
|
||||
void updateViewport()
|
||||
{
|
||||
qDebug() << "OSGSkyNode::updateViewport" << skyNode;
|
||||
// qDebug() << "OSGSkyNode::updateViewport" << skyNode;
|
||||
if (!skyNode.valid()) {
|
||||
qWarning() << "OSGSkyNode::updateViewport - invalid sky node" << skyNode;
|
||||
return;
|
||||
}
|
||||
qDebug() << "OSGSkyNode::updateViewport - attaching to" << viewport->asView();
|
||||
// qDebug() << "OSGSkyNode::updateViewport - attaching to" << viewport->asView();
|
||||
skyNode->attach(viewport->asView());
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ public:
|
||||
private slots:
|
||||
void onSceneNodeChanged(osg::Node *node)
|
||||
{
|
||||
qDebug() << "OSGSkyNode::onSceneNodeChanged" << node;
|
||||
// qDebug() << "OSGSkyNode::onSceneNodeChanged" << node;
|
||||
updateScene();
|
||||
}
|
||||
};
|
||||
|
@ -271,7 +271,7 @@ private slots:
|
||||
public:
|
||||
bool acceptSceneNode(OSGNode *node)
|
||||
{
|
||||
qDebug() << "OSGViewport::acceptSceneNode" << node;
|
||||
// qDebug() << "OSGViewport::acceptSceneNode" << node;
|
||||
if (sceneNode == node) {
|
||||
return true;
|
||||
}
|
||||
@ -291,7 +291,7 @@ public:
|
||||
|
||||
bool acceptCameraNode(OSGCamera *node)
|
||||
{
|
||||
qDebug() << "OSGViewport::acceptCameraNode" << node;
|
||||
// qDebug() << "OSGViewport::acceptCameraNode" << node;
|
||||
if (cameraNode == node) {
|
||||
return true;
|
||||
}
|
||||
@ -311,7 +311,7 @@ public:
|
||||
|
||||
bool acceptManipulator(OSGCameraManipulator *m)
|
||||
{
|
||||
qDebug() << "OSGViewport::acceptManipulator" << manipulator;
|
||||
// qDebug() << "OSGViewport::acceptManipulator" << manipulator;
|
||||
if (manipulator == m) {
|
||||
return true;
|
||||
}
|
||||
@ -370,7 +370,7 @@ private:
|
||||
|
||||
void onAboutToBeDestroyed()
|
||||
{
|
||||
qDebug() << "OSGViewport::Hidden::onAboutToBeDestroyed";
|
||||
// qDebug() << "OSGViewport::Hidden::onAboutToBeDestroyed";
|
||||
osgQtQuick::openGLContextInfo(QOpenGLContext::currentContext(), "OSGViewport::Hidden::onAboutToBeDestroyed");
|
||||
// context is not current and don't know how to make it current...
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
|
||||
bool acceptSceneNode(OSGNode *node)
|
||||
{
|
||||
qDebug() << "OSGCameraManipulator::acceptSceneNode" << node;
|
||||
// qDebug() << "OSGCameraManipulator::acceptSceneNode" << node;
|
||||
if (sceneNode == node) {
|
||||
return true;
|
||||
}
|
||||
@ -93,14 +93,14 @@ public:
|
||||
qWarning() << "OSGCameraManipulator::updateSceneNode - no scene node";
|
||||
return;
|
||||
}
|
||||
qDebug() << "OSGCameraManipulator::updateSceneNode" << sceneNode;
|
||||
// qDebug() << "OSGCameraManipulator::updateSceneNode" << sceneNode;
|
||||
manipulator->setNode(sceneNode->node());
|
||||
}
|
||||
|
||||
private slots:
|
||||
void onSceneNodeChanged(osg::Node *node)
|
||||
{
|
||||
qDebug() << "OSGCameraManipulator::onSceneNodeChanged" << node;
|
||||
// qDebug() << "OSGCameraManipulator::onSceneNodeChanged" << node;
|
||||
updateSceneNode();
|
||||
}
|
||||
};
|
||||
@ -150,7 +150,7 @@ void OSGCameraManipulator::classBegin()
|
||||
|
||||
void OSGCameraManipulator::componentComplete()
|
||||
{
|
||||
qDebug() << "OSGCameraManipulator::componentComplete" << this;
|
||||
// qDebug() << "OSGCameraManipulator::componentComplete" << this;
|
||||
update();
|
||||
clearDirty();
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
|
||||
bool acceptTrackNode(OSGNode *node)
|
||||
{
|
||||
qDebug() << "OSGNodeTrackerManipulator::acceptTrackNode" << node;
|
||||
// qDebug() << "OSGNodeTrackerManipulator::acceptTrackNode" << node;
|
||||
if (trackNode == node) {
|
||||
return false;
|
||||
}
|
||||
@ -89,7 +89,7 @@ public:
|
||||
qWarning() << "OSGNodeTrackerManipulator::updateTrackNode - no track node";
|
||||
return;
|
||||
}
|
||||
qDebug() << "OSGNodeTrackerManipulator::updateTrackNode" << trackNode->node();
|
||||
// qDebug() << "OSGNodeTrackerManipulator::updateTrackNode" << trackNode->node();
|
||||
manipulator->setTrackNode(trackNode->node());
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ public:
|
||||
private slots:
|
||||
void onTrackNodeChanged(osg::Node *node)
|
||||
{
|
||||
qDebug() << "OSGNodeTrackerManipulator::onTrackNodeChanged" << node;
|
||||
// qDebug() << "OSGNodeTrackerManipulator::onTrackNodeChanged" << node;
|
||||
qWarning() << "OSGNodeTrackerManipulator::onTrackNodeChanged - needs to be implemented";
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user