GLWindow to change background color

All about Windows versions
Post Reply
kasper
Posts: 29
Joined: Thu May 17, 2018 6:13 am

GLWindow to change background color

Post 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.
daniel
Site Admin
Posts: 7701
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: GLWindow to change background color

Post 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.
Daniel, CloudCompare admin
kasper
Posts: 29
Joined: Thu May 17, 2018 6:13 am

Re: GLWindow to change background color

Post by kasper »

Problem solved. Thanks for your help!
Post Reply