void Scene::show( app::WindowRef window, bool useWindowBounds ) { mDisplayConnection.disconnect(); mDisplayConnection.store( window->getSignalDraw().connect( 1, [this]() { draw(); } ) ); if( useWindowBounds ) { setBounds( window->getBounds() ); } appear(); }
void Narcotic::draw() { gl::clear(); fboProjection.bindFramebuffer(); gl::clear(Color::gray(0.25)); v1.draw(); fboProjection.unbindFramebuffer(); gl::draw(fboProjection.getTexture(), Rectf(projectionWindow->getBounds())); //fboProjection.unbindTexture(); }