Added assigned of the InteractiveImageHandler as a cull callback to enable the interactive image to know when it's being actively used as part of rendering a frame.
This commit is contained in:
@@ -66,7 +66,10 @@ bool PdfReader::assign(PdfImage* pdfImage, const GeometryHints& hints)
|
||||
texture,
|
||||
osg::StateAttribute::ON);
|
||||
|
||||
pictureQuad->setEventCallback(new osgViewer::InteractiveImageHandler(_pdfImage.get()));
|
||||
osg::ref_ptr<osgViewer::InteractiveImageHandler> iih = new osgViewer::InteractiveImageHandler(_pdfImage.get());
|
||||
|
||||
pictureQuad->setEventCallback(iih.get());
|
||||
pictureQuad->setCullCallback(iih.get());
|
||||
|
||||
addDrawable(pictureQuad);
|
||||
|
||||
|
||||
@@ -61,7 +61,10 @@ bool VncClient::assign(VncImage* vncImage, const GeometryHints& hints)
|
||||
texture,
|
||||
osg::StateAttribute::ON);
|
||||
|
||||
pictureQuad->setEventCallback(new osgViewer::InteractiveImageHandler(_vncImage.get()));
|
||||
osg::ref_ptr<osgViewer::InteractiveImageHandler> iih = new osgViewer::InteractiveImageHandler(_vncImage.get());
|
||||
|
||||
pictureQuad->setEventCallback(iih.get());
|
||||
pictureQuad->setCullCallback(iih.get());
|
||||
|
||||
addDrawable(pictureQuad);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user