[osg-users] How to resize when using PIXEL_BUFFER?

Giorge Koulin gosha.koulin at gmail.com
Wed Dec 13 14:30:05 PST 2017


Hi,

I was able to solve my problem, at last!!

I was curious to investigate the re-allocating FBO option Robert talked about. Basically by setting camera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); and making sure my image pixelFormat and internalTextureFormat are correct. Then whenever the widget is resized I reallocate the image and resize viewport etc. Also reallocate FBO with the following calls:

osgViewer::Renderer* renderer = (osgViewer::Renderer*)camera->getRenderer();
renderer->getSceneView(0)->getRenderStage()->setCameraRequiresSetUp(true);
renderer->getSceneView(0)->getRenderStage()->setFrameBufferObject(NULL);

I will share the new GtkmmOsgViewer for gtkmm3 on git soon.

Thank you!

Cheers,
Giorge

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72583#72583







More information about the osg-users mailing list