]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/jpg-httpd.cxx
Remove references to SceneView and CameraView
[flightgear.git] / src / Network / jpg-httpd.cxx
index f8ec013485a1ab299256d88599a2999218a70a9c..7ff7341bffa8a852c01e6404164136698a192585 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <Main/fg_props.hxx>
 #include <Main/globals.hxx>
+#include <Main/renderer.hxx>
 
 #include "jpg-httpd.hxx"
 
@@ -50,8 +51,8 @@
 #define __TIMEOUT_COUNT             5
 #define __HTTP_GET_STRING           "GET "
 
-#include <osg/CameraNode>
-extern osg::ref_ptr<osg::CameraNode> mSceneCamera;
+#include <osgUtil/SceneView>
+extern osg::ref_ptr<osgUtil::SceneView> sceneView;
 
 SG_USING_STD(string);
 
@@ -106,7 +107,10 @@ void HttpdImageChannel :: foundTerminator( void ) {
         SG_LOG( SG_IO, SG_DEBUG, "<<<<<<<<< HTTP Request : " << pRequest );
 
         double left, right, bottom, top, zNear, zFar;
-        mSceneCamera->getProjectionMatrixAsFrustum( left, right, bottom, top, zNear, zFar );
+       osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
+        viewer->getCamera()->getProjectionMatrixAsFrustum(left, right,
+                                                          bottom, top,
+                                                          zNear, zFar);
         JpgFactory->setFrustum( left, right, bottom, top, zNear, zFar );
 
         nImageLen  = JpgFactory -> render();