How To Change The Background Color of a Window

The default background color of a window is gray. How can I change this to a different color?

wfx->get_graphics_window()->set_clear_color(1, 1, 1, 1);

I’ve tried the following but it didn’t change the background colour of the window.

		// Set the background colour to black.
		PT(GraphicsWindow) gw = window->get_graphics_window(); 

In WindowFramework, the background color may be set on the DisplayRegion, instead of on the window.

This will allow the window’s background color to become visible:

DisplayRegion *dr = window->get_display_region_3d();

Or this will set the desired color on the DisplayRegion:

dr->set_clear_color(Colorf(0, 0, 0, 1));