Fixed a bug in the drive manipulator which was due to it using the local
coords of the intersection point with the scene rather than the world coord value for that point. The code now uses osgUtil::Hit::getWorldIntersectionPoint() method for getting the world coords. Added support for getWorldIntersectionPoint to Viewer.cpp. Put and #ifdef around the setting of the default display list visitor so it nolonger sets in under IRIX. This is a world around to the IR graphics imbending lighting info into display lists, if the display lists are created before state is set up it produces lighting artifacts such as flickering. Remove the the default display list init visitor removes these problems, display lists are then built on the fly and drawables a drawn for the first time.
This commit is contained in:
@@ -61,9 +61,15 @@ void SceneView::setDefaults()
|
||||
_renderStage = new RenderStage;
|
||||
|
||||
|
||||
#ifndef __sgi
|
||||
// sgi's IR graphics has a problem with lighting and display lists, as it seems to store
|
||||
// lighting state with the display list, and the display list visitor doesn't currently apply
|
||||
// state before creating display lists. So will disable the init visitor default, this won't
|
||||
// affect functionality since the display lists will be created as and when needed.
|
||||
DisplayListVisitor* dlv = new DisplayListVisitor();
|
||||
dlv->setState(_state.get());
|
||||
_initVisitor = dlv;
|
||||
#endif
|
||||
|
||||
_appVisitor = new AppVisitor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user