fixed: gcc8 compile issues
[opensg.git] / Source / Contrib / ComplexSceneManager / OSGCSMWindow.cpp
blobbdb6bf34556fb9d8265884b6efb7b49f31c9af0e
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 //---------------------------------------------------------------------------
40 // Includes
41 //---------------------------------------------------------------------------
43 #include <cstdlib>
44 #include <cstdio>
46 #include "OSGConfig.h"
48 #include "OSGCSMDrawer.h"
49 #include "OSGCSMWindow.h"
50 #include "OSGRenderAction.h"
51 #include "OSGCSMViewport.h"
52 #include "OSGCSMDrawManager.h"
54 #include "OSGOSGSceneFileType.h"
55 #include "OSGNameAttachment.h"
56 #include "OSGComplexSceneManager.h"
57 #include "OSGStatisticsForeground.h"
59 OSG_BEGIN_NAMESPACE
61 // Documentation for this class is emitted in the
62 // OSGCSMWindowBase.cpp file.
63 // To modify it, please change the .fcd file (OSGCSMWindow.fcd) and
64 // regenerate the base file.
66 /***************************************************************************\
67 * Class variables *
68 \***************************************************************************/
70 /***************************************************************************\
71 * Class methods *
72 \***************************************************************************/
74 void CSMWindow::initMethod(InitPhase ePhase)
76 Inherited::initMethod(ePhase);
78 if(ePhase == TypeObject::SystemPost)
84 /***************************************************************************\
85 * Instance methods *
86 \***************************************************************************/
88 /*-------------------------------------------------------------------------*\
89 - private -
90 \*-------------------------------------------------------------------------*/
92 /*----------------------- constructors & destructors ----------------------*/
94 CSMWindow::CSMWindow(void) :
95 Inherited ( ),
96 _pWindow ( NULL),
97 _pStatFG ( NULL),
98 _bFirstFrame ( true),
99 _oTouchBlob ( ),
100 _uiTouchMode ( 0),
101 _bMouseActive(false)
105 CSMWindow::CSMWindow(const CSMWindow &source) :
106 Inherited (source),
107 _pWindow (NULL ),
108 _pStatFG (NULL ),
109 _bFirstFrame (true ),
110 _oTouchBlob ( ),
111 _uiTouchMode ( 0),
112 _bMouseActive(false )
116 CSMWindow::~CSMWindow(void)
120 void CSMWindow::resolveLinks(void)
122 Inherited::resolveLinks();
124 _pWindow = NULL;
125 _pStatFG = NULL;
128 void CSMWindow::reshape(Int32 w,
129 Int32 h)
131 if(_pWindow != NULL)
133 this->setSize(Vec2f(w, h));
135 _pWindow->resize(w, h);
139 void CSMWindow::mouse(Int32 iButton,
140 Int32 iState,
141 Int32 iModifier,
142 Int32 x,
143 Int32 y)
145 if(iState == MouseData::ButtonDown)
147 _bMouseActive = true;
149 else
151 _bMouseActive = false;
154 if(_sfMouseAsMTouch.getValue() == true)
156 if(iState == MouseData::ButtonDown)
158 editMTouchData().addCursor(0, x, y, MTouchData::WindowAbs);
160 else
162 editMTouchData().removeCursor(0);
164 if(_uiTouchMode == 1)
166 editMTouchData().removeCursor(1);
170 commitChanges();
172 _sfMTouchData.getValue().clear();
174 _uiTouchMode = 0;
176 else
178 editMouseData().setData( iButton,
179 iState,
180 iModifier,
183 _pWindow);
185 commitChanges();
189 void CSMWindow::motion(Int32 x,
190 Int32 y,
191 Int32 iModifier)
193 if(_bMouseActive == false)
194 return;
196 if(_sfMouseAsMTouch.getValue() == true)
198 if(_uiTouchMode == 0)
200 if(0x0000 != (iModifier & MouseData::CtrlActive))
202 _uiTouchMode = 1;
204 editMTouchData().updateCursor(0,
205 _oTouchBlob._vPosition[0],
206 _oTouchBlob._vPosition[1],
207 _oTouchBlob._uiCoordSys );
209 editMTouchData().updateCursor(1, x, y, MTouchData::WindowAbs);
211 else
213 editMTouchData().updateCursor(0, x, y, MTouchData::WindowAbs);
215 _oTouchBlob._vPosition.setValues(x, y, 0);
216 _oTouchBlob._uiCoordSys = MTouchData::WindowAbs;
219 else
221 if(0x0000 != (iModifier & MouseData::CtrlActive))
223 editMTouchData().updateCursor(0,
224 _oTouchBlob._vPosition[0],
225 _oTouchBlob._vPosition[1],
226 _oTouchBlob._uiCoordSys );
228 editMTouchData().updateCursor(1, x, y, MTouchData::WindowAbs);
230 else
232 _uiTouchMode = 0;
234 editMTouchData().updateCursor(0, x, y, MTouchData::WindowAbs);
235 editMTouchData().removeCursor(1);
237 _oTouchBlob._vPosition.setValues(x, y, 0);
238 _oTouchBlob._uiCoordSys = MTouchData::WindowAbs;
242 commitChanges();
244 _sfMTouchData.getValue().clear();
246 else
248 editMouseData().updateData(x, y, _pWindow);
253 void CSMWindow::addMTouchCursor(Int32 iCursorId,
254 Int32 x,
255 Int32 y,
256 UInt32 uiCoordSys)
258 editMTouchData().addCursor(iCursorId,
261 uiCoordSys);
264 void CSMWindow::updateMTouchCursor(Int32 iCursorId,
265 Int32 x,
266 Int32 y,
267 UInt32 uiCoordSys)
269 editMTouchData().updateCursor(iCursorId,
272 uiCoordSys);
275 void CSMWindow::removeMTouchCursor(Int32 iCursorId)
277 editMTouchData().removeCursor(iCursorId);
280 void CSMWindow::commitMTouchCursors(void)
282 commitChanges();
284 _sfMTouchData.getValue().clear();
287 CSMDrawer *CSMWindow::getParent(void) const
289 CSMDrawer *returnValue = dynamic_cast<CSMDrawer *>(_sfParent.getValue());
291 if(returnValue == NULL)
293 CSMWindow *pWin = dynamic_cast<CSMWindow *>(_sfParent.getValue());
295 if(pWin != NULL)
297 returnValue = pWin->getParent();
301 return returnValue;
304 void CSMWindow::queueTask(DrawTask *pTask)
306 if(_pWindow != NULL)
308 _pWindow->queueTask(pTask);
313 /*----------------------------- class specific ----------------------------*/
315 void CSMWindow::changed(ConstFieldMaskArg whichField,
316 UInt32 origin,
317 BitVector details)
319 if (0x0000 != (whichField & MTouchDataFieldMask))
321 MFViewportsType::const_iterator vpIt = _mfViewports.begin();
322 MFViewportsType::const_iterator vpEnd = _mfViewports.end ();
324 for(; vpIt != vpEnd; ++vpIt)
326 if(*vpIt == NULL)
327 continue;
329 (*vpIt)->editMTouchDataVC().clear();
332 MTouchData::MTouchBlobStore &vBlobs =
333 _sfMTouchData.getValue().getBlobStore();
335 MTouchData::MTouchBlobStoreIt bIt = vBlobs.begin();
336 MTouchData::MTouchBlobStoreIt bEnd = vBlobs.end ();
338 MTouchData::MTouchBlobStore &vBlobsWC =
339 editMTouchDataWC().getBlobStore();
341 #if 0
342 fprintf(stderr, "process\n=====================================\n");
343 fprintf(stderr, "input mtouch\n");
344 _sfMTouchData.getValue().dump();
346 fprintf(stderr, "wc mtouch\n");
347 _sfMTouchDataWC.getValue().dump();
348 #endif
350 if(bIt == bEnd)
352 vBlobsWC.clear();
355 MTouchData::MTouchBlobStoreIt bWCIt = vBlobsWC.begin();
357 for (; bIt != bEnd; ++bIt)
359 Vec2i vScreenC;
361 switch(bIt->_uiCoordSys)
363 case MTouchData::GlobalRel:
365 vScreenC = this->translateGlobalCoordinatesRel(
366 bIt->_vPosition[0],
367 bIt->_vPosition[1]);
370 break;
372 case MTouchData::GlobalAbs:
373 vScreenC = this->translateGlobalCoordinatesAbs(
374 bIt->_vPosition[0],
375 bIt->_vPosition[1]);
377 break;
379 case MTouchData::WindowRel:
380 vScreenC[0] =
381 bIt->_vPosition[0] * Real32(this->getSize()[0]) + 0.5f;
383 vScreenC[1] =
384 bIt->_vPosition[1] * Real32(this->getSize()[1]) + 0.5f;
386 break;
388 case MTouchData::WindowAbs:
389 vScreenC[0] = bIt->_vPosition[0];
390 vScreenC[1] = bIt->_vPosition[1];
391 break;
393 default:
394 break;
399 #if 0
400 fprintf(stderr, "process %d %d\n",
401 bIt->_iCursorId,
402 (bWCIt != vBlobsWC.end()) ? bWCIt->_iCursorId : -1);
403 #endif
405 while(bWCIt != vBlobsWC.end())
407 if(bWCIt->_uiEvent != MTouchData::RemoveCursor)
408 break;
410 bWCIt = vBlobsWC.erase(bWCIt);
413 if(bWCIt != vBlobsWC.end() &&
414 bIt->_iCursorId == bWCIt->_iCursorId )
416 bWCIt->_uiEvent = bIt->_uiEvent;
417 bWCIt->_vPosition[0] = vScreenC[0];
418 bWCIt->_vPosition[1] = vScreenC[1];
419 bWCIt->_uiCoordSys = MTouchData::WindowAbs;
421 #if 0
422 fprintf(stderr, "update %d (%d) | %p\n",
423 bIt->_iCursorId,
424 bIt->_uiEvent,
425 bIt->_pActiveViewport);
426 #endif
428 if(bWCIt->_pActiveViewport != NULL)
430 Vec2f vVPCoord =
431 bWCIt->_pActiveViewport->translateWindowViewportAbs(
432 vScreenC[0],
433 vScreenC[1]);
435 MTouchData::MTouchBlob tmpBlobVC(
436 bIt->_uiEvent,
437 bIt->_iCursorId,
438 vVPCoord[0],
439 vVPCoord[1],
440 MTouchData::ViewportAbs);
442 tmpBlobVC._pWindow = this->_pWindow;
443 tmpBlobVC._pViewport =
444 bWCIt->_pActiveViewport->getViewport(0);
446 bWCIt->_pActiveViewport->editMTouchDataVC().
447 getBlobStore().push_back(tmpBlobVC);
450 ++bWCIt;
451 break;
453 else
455 if(bWCIt == vBlobsWC.end() ||
456 bWCIt->_iCursorId > bIt->_iCursorId )
458 if(bIt->_uiEvent == MTouchData::AddCursor)
460 MTouchData::MTouchBlob tmpBlobWC(
461 bIt->_uiEvent,
462 bIt->_iCursorId,
463 vScreenC[0],
464 vScreenC[1],
465 MTouchData::WindowAbs);
467 tmpBlobWC._pWindow = this->_pWindow;
469 CSMViewport *pViewport = this->findViewport(
470 vScreenC[0],
471 vScreenC[1]);
473 if(pViewport != NULL)
475 Vec2f vVPCoord =
476 pViewport->translateWindowViewportAbs(
477 vScreenC[0],
478 vScreenC[1]);
480 MTouchData::MTouchBlob tmpBlobVC(
481 bIt->_uiEvent,
482 bIt->_iCursorId,
483 vVPCoord[0],
484 vVPCoord[1],
485 MTouchData::ViewportAbs);
487 tmpBlobVC._pWindow = this->_pWindow;
488 tmpBlobVC._pViewport =
489 pViewport->getViewport(0);
491 tmpBlobWC._pActiveViewport = pViewport;
493 pViewport->editMTouchDataVC().getBlobStore().
494 push_back(tmpBlobVC);
497 bWCIt = vBlobsWC.insert(bWCIt, tmpBlobWC);
498 ++bWCIt;
500 #if 0
501 fprintf(stderr, "insert %d (%d)\n",
502 tmpBlobWC._iCursorId,
503 tmpBlobWC._uiEvent);
504 #endif
506 break;
508 else
510 break;
513 else if(bWCIt->_iCursorId < bIt->_iCursorId)
515 #if 0
516 fprintf(stderr, "remove %d (%d)\n",
517 bWCIt->_iCursorId,
518 bWCIt->_uiEvent);
519 #endif
521 bWCIt = vBlobsWC.erase(bWCIt);
523 else
525 break;
528 } while(bWCIt != vBlobsWC.end());
531 if(bWCIt != vBlobsWC.end())
533 vBlobsWC.erase(bWCIt, vBlobsWC.end());
536 #if 0
537 fprintf(stderr, "process end\n=====================================\n");
538 fprintf(stderr, "input mtouch\n");
539 _sfMTouchData.getValue().dump();
541 fprintf(stderr, "wc mtouch\n");
542 _sfMTouchDataWC.getValue().dump();
543 #endif
546 if (0x0000 != (whichField & MTouchDataWCFieldMask))
548 #if 0
549 fprintf(stderr, "\n=============\nplop\n=====================\n");
550 #endif
553 if (0x0000 != (whichField & GestureDataFieldMask))
555 _sfGestureData.getValue().setWindow(_pWindow);
556 _sfGestureData.getValue().setCSMWindow(this);
559 if (0x0000 != (whichField & MouseDataFieldMask))
561 MouseData &oMouseData = _sfMouseData.getValue();
563 if(oMouseData.getState() != -1)
565 if(oMouseData.getState() == MouseData::ButtonDown)
567 CSMViewport *pViewport = this->findViewport(
568 oMouseData.getX(),
569 oMouseData.getY());
571 oMouseData._pActivePort = pViewport;
573 if(oMouseData._pActivePort != NULL)
575 Vec2f vVPCoord =
576 oMouseData._pActivePort->translateWindowViewportAbs(
577 oMouseData.getX(),
578 oMouseData.getY());
580 MouseData &oVPMouseData =
581 oMouseData._pActivePort->editMouseDataVC();
583 oVPMouseData.setData(oMouseData.getButton (),
584 oMouseData.getState (),
585 oMouseData.getModifier(),
586 vVPCoord[0],
587 vVPCoord[1],
588 oMouseData.getWindow (),
589 oMouseData.getMode ());
592 oVPMouseData.setViewport(
593 oMouseData._pActivePort->getViewport(0));
596 else
598 if(oMouseData._pActivePort != NULL)
600 Vec2f vVPCoord =
601 oMouseData._pActivePort->translateWindowViewportAbs(
602 oMouseData.getX(),
603 oMouseData.getY());
605 MouseData &oVPMouseData =
606 oMouseData._pActivePort->editMouseDataVC();
608 oVPMouseData.setData(oMouseData.getButton (),
609 oMouseData.getState (),
610 oMouseData.getModifier(),
611 vVPCoord[0],
612 vVPCoord[1],
613 oMouseData.getWindow (),
614 oMouseData.getMode ());
617 oVPMouseData.setViewport(
618 oMouseData._pActivePort->getViewport(0));
621 oMouseData._pActivePort = NULL;
624 else
626 if(oMouseData._pActivePort != NULL)
628 Vec2f vVPCoord =
629 oMouseData._pActivePort->translateWindowViewportAbs(
630 oMouseData.getX(),
631 oMouseData.getY());
633 MouseData &oVPMouseData =
634 oMouseData._pActivePort->editMouseDataVC();
636 oVPMouseData.setData(oMouseData.getButton (),
637 oMouseData.getState (),
638 oMouseData.getModifier(),
639 vVPCoord[0],
640 vVPCoord[1],
641 oMouseData.getWindow (),
642 oMouseData.getMode ());
645 oVPMouseData.setViewport(
646 oMouseData._pActivePort->getViewport(0));
651 Inherited::changed(whichField, origin, details);
654 CSMViewport *CSMWindow::findViewport(Real32 x, Real32 y) const
656 MFViewportsType::const_iterator vpIt = _mfViewports.begin();
657 MFViewportsType::const_iterator vpEnd = _mfViewports.end ();
659 for(; vpIt != vpEnd; ++vpIt)
661 if((*vpIt)->pointInside(x, y) == true)
662 return *vpIt;
665 return NULL;
668 void CSMWindow::dump( UInt32 ,
669 const BitVector ) const
671 SLOG << "Dump CSMWindow NI" << std::endl;
674 Vec2f CSMWindow::translateScreenCoordinatesRel(Real32 rX,
675 Real32 rY)
677 Vec2f returnValue(0.f, 0.f);
679 return returnValue;
682 Vec2i CSMWindow::translateGlobalCoordinatesRel(Real32 rX,
683 Real32 rY)
685 Vec2i returnValue(0, 0);
687 return returnValue;
690 Vec2i CSMWindow::translateGlobalCoordinatesAbs(Int32 iX,
691 Int32 iY)
693 Vec2i returnValue(0, 0);
695 return returnValue;
698 Vec2f CSMWindow::translateToScreenCoordinatesAbs(Real32 rX,
699 Real32 rY)
701 Vec2f returnValue(0.f, 0.f);
703 return returnValue;
706 bool CSMWindow::init(void)
708 bool returnValue = true;
710 MFUnrecCSMViewportPtr::const_iterator vIt = getMFViewports()->begin();
711 MFUnrecCSMViewportPtr::const_iterator vEnd = getMFViewports()->end ();
713 while(vIt != vEnd)
715 returnValue = (*vIt)->init(this);
717 if(returnValue == false)
719 break;
722 ++vIt;
725 if(_pWindow != NULL && returnValue == true)
727 vIt = getMFViewports()->begin();
728 vEnd = getMFViewports()->end ();
730 for(; vIt != vEnd; ++vIt)
732 CSMViewport::ViewportStoreConstIt pIt = (*vIt)->beginViewports();
733 CSMViewport::ViewportStoreConstIt pEnd = (*vIt)->endViewports ();
735 for(; pIt != pEnd; ++pIt)
737 _pWindow->addPort((*pIt));
741 #if 0
742 fprintf(stderr, "foo %p %d\n",
743 ComplexSceneManager::the()->getDrawManager(),
744 UInt32(ComplexSceneManager::the()->
745 getDrawManager()->getParallel()));
746 #endif
748 #ifndef __APPLE__
749 UInt32 uiDrawMode = this->getPartitionDrawMode();
750 #else
751 UInt32 uiDrawMode = Window::SequentialPartitionDraw;
753 FWARNING(("Detected apple, only sequential draw mode available\n"));
754 #endif
756 if(ComplexSceneManager::the()->getDrawManager()->getParallel() == true)
758 uiDrawMode |= Window::ParallelDrawer;
760 else
762 uiDrawMode |= Window::StdDrawer;
765 _pWindow->setRenderOptions (this->getRenderOptions());
766 _pWindow->setPartitionDrawMode(uiDrawMode );
767 _pWindow->setDrawerType (uiDrawMode );
769 _pWindow->setIgnoreAllExtensions(this->getIgnoreAllExtensions());
771 MFString::const_iterator ieIt = _mfIgnoreExtensions.begin();
772 MFString::const_iterator ieEnd = _mfIgnoreExtensions.end ();
774 for(; ieIt != ieEnd; ++ieIt)
776 Window::ignoreExtensions(ieIt->c_str());
780 // OSGSceneFileType::the().writeContainer(_pWindow, "/tmp/window.osg");
782 if(this->getDumpContainer() == true)
784 FieldContainerFactory::the()->dump();
787 return returnValue;
790 void CSMWindow::render(RenderAction *pAction)
792 #ifdef OSG_MT_CPTR_ASPECT
793 Window *pThreadLocalWin =
794 Aspect::convertToCurrent<Window *>(_pWindow.get());
795 StatisticsForeground *pThreadLocalStatFG =
796 Aspect::convertToCurrent<StatisticsForeground *>(_pStatFG );
797 #else
798 Window *pThreadLocalWin = _pWindow;
799 StatisticsForeground *pThreadLocalStatFG = _pStatFG;
800 #endif
802 if(pThreadLocalWin == NULL)
803 return;
805 if(pThreadLocalStatFG != NULL)
807 if(pThreadLocalStatFG->getActive() == true)
809 pAction->setStatCollector(pThreadLocalStatFG->getCollector());
810 pAction->setUseGLFinish (true);
812 else
814 pAction->setStatCollector(NULL );
815 pAction->setUseGLFinish (false);
819 // fprintf(stderr, "csmwin::render %p\n", pThreadLocalStatFG);
821 #if 0
822 if(_bFirstFrame == true)
824 _bFirstFrame = false;
826 pAction->setFrustumCulling(false);
828 pThreadLocalWin->render(pAction);
830 pAction->setFrustumCulling(true);
832 else
834 pThreadLocalWin->render(pAction);
836 #else
837 if(_bFirstFrame == true)
839 _bFirstFrame = false;
841 pAction->setFrustumCulling(false);
843 pThreadLocalWin->renderNoFinish(pAction);
845 pAction->setFrustumCulling(true);
847 else
849 pThreadLocalWin->renderNoFinish(pAction);
852 pThreadLocalWin->frameFinish();
853 #endif
856 void CSMWindow::frameRenderNoFinish(RenderAction *pAction)
858 #ifdef OSG_MT_CPTR_ASPECT
859 Window *pThreadLocalWin =
860 Aspect::convertToCurrent<Window *>(_pWindow.get());
861 StatisticsForeground *pThreadLocalStatFG =
862 Aspect::convertToCurrent<StatisticsForeground *>(_pStatFG );
863 #else
864 Window *pThreadLocalWin = _pWindow;
865 StatisticsForeground *pThreadLocalStatFG = _pStatFG;
866 #endif
868 if(pThreadLocalWin == NULL)
869 return;
871 if(pThreadLocalStatFG != NULL)
873 if(pThreadLocalStatFG->getActive() == true)
875 pAction->setStatCollector(pThreadLocalStatFG->getCollector());
877 else
879 pAction->setStatCollector(NULL);
883 if(_bFirstFrame == true)
885 _bFirstFrame = false;
887 pAction->setFrustumCulling(false);
889 pThreadLocalWin->renderNoFinish(pAction);
891 pAction->setFrustumCulling(true);
893 else
895 pThreadLocalWin->renderNoFinish(pAction);
899 void CSMWindow::frameFinish(void)
901 #ifdef OSG_MT_CPTR_ASPECT
902 Window *pThreadLocalWin =
903 Aspect::convertToCurrent<Window *>(_pWindow.get());
904 #else
905 Window *pThreadLocalWin = _pWindow;
906 #endif
908 if(pThreadLocalWin == NULL)
909 return;
911 pThreadLocalWin->frameFinish();
914 void CSMWindow::frameExit(void)
916 #ifdef OSG_MT_CPTR_ASPECT
917 Window *pThreadLocalWin =
918 Aspect::convertToCurrent<Window *>(_pWindow.get());
919 #else
920 Window *pThreadLocalWin = _pWindow;
921 #endif
923 if(pThreadLocalWin == NULL)
924 return;
926 pThreadLocalWin->runFrameExit();
929 void CSMWindow::shutdown(void)
931 #ifdef OSG_MT_CPTR_ASPECT
932 Window *pThreadLocalWin =
933 Aspect::convertToCurrent<Window *>(_pWindow.get());
934 #else
935 Window *pThreadLocalWin = _pWindow;
936 #endif
938 Inherited::resolveLinks();
940 if(pThreadLocalWin == NULL)
941 return;
943 pThreadLocalWin->resolveLinks();
946 void CSMWindow::postSync(void)
948 if(_pWindow != NULL)
950 _pWindow->clearDrawTasks();
954 bool CSMWindow::requestStereoVisual(void)
956 bool returnValue = false;
958 MFUnrecCSMViewportPtr::const_iterator vIt = getMFViewports()->begin();
959 MFUnrecCSMViewportPtr::const_iterator vEnd = getMFViewports()->end ();
961 for(; vIt != vEnd; ++vIt)
963 returnValue = (*vIt)->needsStereoVisual();
965 if(returnValue == true)
967 break;
971 return returnValue;
974 OSG_END_NAMESPACE