MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / drawFull

Method drawFull

source/MRViewer/MRViewer.cpp:1867–1908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1865}
1866
1867void Viewer::drawFull( bool dirtyScene )
1868{
1869 MR_TIMER;
1870 // unbind to clean main framebuffer
1871 if ( sceneTexture_ )
1872 sceneTexture_->unbind();
1873 // clean main framebuffer
1874 clearFramebuffers();
1875
1876 if ( menuPlugin_ )
1877 menuPlugin_->startFrame();
1878
1879 if ( sceneTexture_ )
1880 {
1881 sceneTexture_->bind( true );
1882 // need to clean it in texture too
1883 clearFramebuffers();
1884 }
1885 signals_->preDrawSignal();
1886 // check dirty scene and need swap
1887 // important to check after preDrawSignal
1888 bool renderScene = forceRedrawFramesWithoutSwap_ <= 1;
1889 if ( sceneTexture_ )
1890 renderScene = renderScene && dirtyScene;
1891 if ( renderScene )
1892 drawScene( sceneTexture_ ? &sceneTexture_->getFramebuffer() : nullptr );
1893 signals_->postDrawSignal();
1894 if ( sceneTexture_ )
1895 {
1896 Timer t( "sceneTexture" );
1897 sceneTexture_->unbind();
1898 if ( renderScene )
1899 sceneTexture_->copyTexture(); // copy scene texture only if scene was rendered
1900
1901 sceneTexture_->draw(); // always draw scene texture
1902 }
1903 if ( menuPlugin_ )
1904 {
1905 drawUiRenderObjects();
1906 menuPlugin_->finishFrame();
1907 }
1908}
1909
1910void Viewer::drawScene( FramebufferData* framebuffer )
1911{

Callers

nothing calls this directly

Calls 6

unbindMethod · 0.80
startFrameMethod · 0.80
copyTextureMethod · 0.80
finishFrameMethod · 0.80
bindMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected