# Black globe and sky during rendering

**URL:** <https://community.cesium.com/t/black-globe-and-sky-during-rendering/42129>\
**Category:** CesiumJS\
**Created:** [July 17, 2025, 11:09am UTC](https://community.cesium.com/t/black-globe-and-sky-during-rendering/42129 "2025-07-17T11:09:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hannes\_N](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannes_n/32/14673_2.png) [@Hannes\_N](https://community.cesium.com/u/Hannes_N)\
**Post date:** [July 17, 2025, 11:09am UTC](https://community.cesium.com/t/black-globe-and-sky-during-rendering/42129/1 "2025-07-17T11:09:36Z")

</div>

Hi all,

I am trying to use the CesiumWidget with a custom render loop.

```auto
   renderLoop() {
        this.clock.tick();
        this.dataSourceDisplay.update(this.clock.currentTime);
        this.resize();
        //@ts-ignore
        this.scene.initializeFrame();
        this.scene.render(this.clock.currentTime);
        requestAnimationFrame(() => {
            this.renderLoop();
        });
    }

```

Curiously, I get a black globe and sky in some frames during rendering.

 ![image](https://global.discourse-cdn.com/cesium/original/3X/0/1/016df1d0b46fe280e68f7124850cae7376a2c8be.jpeg)  
 ![image](https://global.discourse-cdn.com/cesium/original/3X/d/a/da5b7fa38f30ddc008b172e0cc66085ef3e52283.jpeg)

When I set

```auto
useDefaultRenderLoop: true

```

the problem does occur less often but still remains.

The clock object is configured like this

````auto
 clock: {
        currentTime: JulianDate.fromDate(new Date(Date.now())),
        multiplier: 1.0,
        clockStep: ClockStep.SYSTEM_CLOCK_MULTIPLIER,
        clockRange: ClockRange.UNBOUNDED,
        canAnimate: true,
        shouldAnimate: true,
    },```

Does anyone have an idea where this could be coming from?

Thanks in advance!
````

---

<div class="post-metadata">

**Author:** ![mzschwartz5](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mzschwartz5/32/30089_2.png) [@mzschwartz5](https://community.cesium.com/u/mzschwartz5)\
**Post date:** [July 17, 2025, 1:55pm UTC](https://community.cesium.com/t/black-globe-and-sky-during-rendering/42129/2 "2025-07-17T13:55:20Z")

</div>

Hi @Hannes_N, I’m not an expert on this, but it sounds like a double-buffer issue. The scene is being rendered but the widget isn’t, maybe?

I think the problem is that, rather than calling `this.scene.initializeFrame()` and `this.scene.render(...)`, which are private internal methods that you don’t want to mess with, you should be calling `myWidget.render()` with `useDefaultRenderLoop` set to false. [Example sandcastle](https://sandcastle.cesium.com/#c=bZFfa8IwFMW/yqUvVpCU7VGrbDgGhcJke9hLX2Jy24WlicufSid+9yVWmatLHsK955xfuElHDewFb9DBEhTuYY1W+JYMx/tJSSfsVK21clQoNJMZHCoFYYmWNmj6jdGd4Gjm14hCq+KvnB6AWouu4HO4h+N0NkC21GJJezQbwT4jpKbS4llsUDPNx11v8Qlr6qV7RRXUUuvd2VGp43RRqbhrr5gTWgHz1un215pOLwMMsxNzktIYjF2DXx6te1Rhvgh4NrTFdEyJ7mO85xa/SGZJbl0vcTUQAR5Eu9PGgTcyJSRz2O4kdWizrQ9TO8KsvVyfZ9fRnIsOBF9WyegbqgSYDA8alNpL+Sa+sUpWeRb8N1GpKReqeenQSNpH28fdqhyahJA8C+X/Sae13FIzIv8A).

The above seems to work for me, but you may want / need to also experiment with [explicit scene rendereing](https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/).

Hope that helps!
