Exemplo n.º 1
0
    bool _fboDownload()
    {
        const SystemWindow* sysWindow = _channel->getWindow()->getSystemWindow();
        const util::FrameBufferObject* fbo = sysWindow->getFrameBufferObject();
        if( !fbo || fbo->getColorTextures().size() != 1 )
            return false;

        const util::Texture* texture = fbo->getColorTextures().front();
        const PixelViewport& pvp = _channel->getPixelViewport();
        if( texture->getWidth() != pvp.w || texture->getHeight() != pvp.h )
            return false;

        texture->download( buffer.getData( ));
        return true;
    }
Exemplo n.º 2
0
 void make_context_current() { _channel->getWindow()->makeCurrent(); }