Change the order of the main cameras from NESTED_RENDER to POST_RENDER
This seems to be accepted OSG usage for slave cameras. It's possible that this order is important for rendering instruments that use RTT textures on systems without frame buffer object support. I'm thinking that the resulting bugs may be implicated in the "black rectangle" problem.
This commit is contained in:
parent
60e8f14d5b
commit
ada7f622d7
2 changed files with 3 additions and 3 deletions
|
@ -147,7 +147,7 @@ CameraInfo* CameraGroup::addCamera(unsigned flags, Camera* camera,
|
|||
installCullVisitor(farCamera);
|
||||
info->farCamera = farCamera;
|
||||
info->farSlaveIndex = _viewer->getNumSlaves() - 1;
|
||||
farCamera->setRenderOrder(Camera::NESTED_RENDER, info->farSlaveIndex);
|
||||
farCamera->setRenderOrder(Camera::POST_RENDER, info->farSlaveIndex);
|
||||
camera->setCullMask(camera->getCullMask() & ~simgear::BACKGROUND_BIT);
|
||||
camera->setClearMask(GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ CameraInfo* CameraGroup::addCamera(unsigned flags, Camera* camera,
|
|||
installCullVisitor(camera);
|
||||
info->camera = camera;
|
||||
info->slaveIndex = _viewer->getNumSlaves() - 1;
|
||||
camera->setRenderOrder(Camera::NESTED_RENDER, info->slaveIndex);
|
||||
camera->setRenderOrder(Camera::POST_RENDER, info->slaveIndex);
|
||||
_cameras.push_back(info);
|
||||
return info;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ osg::Node* FGCreateRedoutNode()
|
|||
camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
|
||||
camera->setProjectionMatrix(osg::Matrix::ortho2D(-1, 1, -1, 1));
|
||||
camera->setViewMatrix(osg::Matrix::identity());
|
||||
camera->setRenderOrder(osg::Camera::POST_RENDER, 10);
|
||||
camera->setRenderOrder(osg::Camera::POST_RENDER, 99);
|
||||
camera->setClearMask(0);
|
||||
camera->setAllowEventFocus(false);
|
||||
camera->setCullingActive(false);
|
||||
|
|
Loading…
Reference in a new issue