Page 1 of 1

GLWindow to change background color

Posted: Mon Sep 10, 2018 1:58 am
by kasper
As indicated by the title.

In my program(c++ code), I create a ccGLwindow as a widget like "ccViewer".

But I want to change the background-color of the window.

where should I modify the resource code ?

I'd searched in ccGLwindow.h/.cpp , but I still have no idea so far.

I will be grateful for any help you can provide.

Re: GLWindow to change background color

Posted: Mon Sep 10, 2018 7:52 pm
by daniel
See the ccGLWindow::setDisplayParameters function. It takes a ccGui::ParamStruct structure as input. And you can set the 'backgroundCol' attribute of thsis structure.

To see how you can use all these together, refer to the cc2Point5DimEditor::create2DView method for instance.

Re: GLWindow to change background color

Posted: Thu Sep 13, 2018 2:33 am
by kasper
Problem solved. Thanks for your help!