[osg-users] RenderBin vs. SlaveCamera

Johny Canes psijsma at gmail.com
Mon Aug 7 01:21:26 PDT 2017


Hi,

I can help you a little with this.

I personally use a very simple copy shader and a fullscreen quad. Here's an example.


Code:

// camera setup is a bit crowded, but involves render target implementation set to frame_buffer_object, no culling, render order set to PRE, and a ortho2d(w,h) projection matrix.

ref_ptr<Geometry> quad;
		quad = createTexturedQuadGeometry(Vec3(), Vec3(Width, 0.0, 0.0), Vec3(0.0, Height, 0.0));

		ref_ptr<Geode> geode = new Geode;
		geode->addDrawable( quad.get() );

auto ss = geode->getOrCreateStateSet();

		ss->setAttributeAndModes( shader->program, StateAttribute::ON );

gViewer->addSlave( camera, false );



Thank you!

Cheers,
Johny

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







More information about the osg-users mailing list