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(); 
		gw->set_clear_color_active(true);
		gw->set_clear_color(Colorf(0,0,0,1));

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();
dr->set_clear_color_active(false);

Or this will set the desired color on the DisplayRegion:

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

David