We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 141a670 commit 035c5b7Copy full SHA for 035c5b7
1 file changed
src/webots/nodes/WbBackground.cpp
@@ -638,12 +638,11 @@ void WbBackground::applySkyBoxToWren() {
638
} else { // otherwise, use a small uniform texture with the color of the sky
639
cm = wr_texture_cubemap_new();
640
size = 2;
641
- const int size2 = size * size;
642
wr_texture_set_internal_format(WR_TEXTURE(cm), WR_TEXTURE_INTERNAL_FORMAT_RGBA8);
643
- unsigned int data[size2];
+ unsigned int data[4];
644
const WbRgb &c = skyColor();
645
unsigned int color = c.redByte() * 0x10000 + c.greenByte() * 0x100 + c.blueByte();
646
- for (int i = 0; i < size2; i++)
+ for (int i = 0; i < 4; i++)
647
data[i] = color;
648
for (int i = 0; i < 6; i++)
649
wr_texture_cubemap_set_data(cm, reinterpret_cast<const char *>(data), static_cast<WrTextureOrientation>(i));
0 commit comments