globally seen this is my render_function, it is called every time something
is set on the control.
e.g. when the background color is changed:
- In user interface, when pressing a button:
COLORREF red = RGB( 255,0,0 ); // chosen with dialog
my_control->set_color_background( red );
- In my_control :: set_color_background( color_background )
this->color_background = color_background;
this->update_scene( ); // this function calls the render_scene function
void render_scene( )
if ( dataset_loaded )
SwapBuffers( device_context );
this way I always will be able to change the background color, even when the
dataset is not loaded.
the rendering is performed ok, only the background is showed, and when i
load a new dataset, the model is displayed properly on the background.
1. when want to change the background color for the firs time using a color
dialog, it leaves the grey square.
the second time everything is rendered ok.
2. when i move another window over my control it also always leaves a grey
i initialize my opengl_scene in de constructor of my_control.
i hope this is enough information. tnx.
> Hello, Ivo!
> You wrote on Wed, 25 Jun 2003 18:54:47 +0200:
> IK> hi, i have the following problem:
> IK> i have a control in a gui which displays my 3d opengl scene when i
> IK> move for example a color choosing dialog over the control (for
> IK> changing the bgcolor), select a color and close the dialog, the part
> IK> of the controls surface the dialog was on, is gray.
> IK> i tried an update scene directly after the color confirmation, but
> IK> it is does not help. neither when i call it from a WM_PAINT in my
> IK> control. anybody recogneizes this problem? what can i do to prevent
> IK> this.
> IK> in my update scene i start doing a glClearColor(..) and a
> IK> glClear(..) to apply the new color. after that my model is drawn.
> IK> finally i do a
> IK> SwapBuffers( ).
> IK> i hope this is enough information. tnx in advance.
> this is not a normal behaviour. are you sure that rendering is performed
> there are no errors during scene rendering and SwapBuffers? Viewport
> includes area of that control?
> With best regards, Alex Mizrahi aka killer_storm.