Revision 25330 trunk/libraries/lib3DMap/src/org/gvsig/gvsig3d/map3d/MapContext3D.java
MapContext3D.java | ||
---|---|---|
634 | 634 |
|
635 | 635 |
if (props3D.getType() == Layer3DProps.layer3DVector) { |
636 | 636 |
refreshLayerVectorsVisibility(lyr); |
637 |
} else { |
|
637 |
} else if (props3D.getType() == Layer3DProps.layer3DOSG) { |
|
638 |
refreshLayer3DOSGVisibility(lyr); |
|
639 |
}else { |
|
638 | 640 |
refreshLayerVisibility(lyr); |
639 | 641 |
} |
640 |
m_canvas3d.repaint(); |
|
642 |
if (m_canvas3d != null) { |
|
643 |
m_canvas3d.getOSGViewer().releaseGLContext(); |
|
644 |
m_canvas3d.getOSGViewer().configureGLContext(); |
|
645 |
} |
|
641 | 646 |
} |
642 | 647 |
|
648 |
private void refreshLayer3DOSGVisibility(FLayer lyr) { |
|
649 |
if (m_planet == null || m_viewProjection == null) |
|
650 |
return; |
|
651 |
|
|
652 |
Layer3DProps props3D = getLayer3DProps(lyr); |
|
653 |
|
|
654 |
OSGCacheService cacheService = (OSGCacheService) props3D |
|
655 |
.getCacheService(); |
|
656 |
if (cacheService != null) { |
|
657 |
// use VectorCacheService to add features to planet |
|
658 |
cacheService.refreshFeaturesToPlanet(lyr.isVisible()); |
|
659 |
} |
|
660 |
|
|
661 |
} |
|
643 | 662 |
private void refreshLayerVisibility(FLayer layer) { |
644 | 663 |
|
645 | 664 |
Layer3DProps props3D = getLayer3DProps(layer); |
Also available in: Unified diff