zantafio
zantafio

Reputation: 747

Toogle Cesium requestRenderMode after Cesium.viewer has been created

i am trying to toggle Cesiums viewer.requestRenderMode setting, to explore some performance differences. I created a toggle Button for the requestRenderMode property and call the following function:

function toggleRenderMode() {
    console.info("toggleRenderMode");
    requestRenderMode = !requestRenderMode;
    viewer.requestRenderMode = requestRenderMode
    if(requestRenderMode){
        viewer.maximumRenderTimeChange = Infinity;
        console.info("enabling requestRenderMode");

    }else{
        viewer.maximumRenderTimeChange = 0;
        console.info("disabling requestRenderMode");

    }
    console.info("viewer.requestRenderMode:",viewer.requestRenderMode);

}

the console output shows me that the viewers requestRenderMode is set according to the code, however it seems that this has no effect on the rendering. So can this property only be set at the time of Cesium viewers creation?

Thanks a lot!

Upvotes: 0

Views: 197

Answers (1)

Matthew Amato
Matthew Amato

Reputation: 2022

viewer.requestRenderMode does not exist in the API, what you want is viewer.scene.requestRenderMode.

Upvotes: 1

Related Questions