Assuming that you are using the CD_GL driver, then you can not clear the
canvas, nor flush it using CD. Or it will mess with everything in the
canvas. Leave that to the glcanvasbox management. Notice that for the CD_GL
driver the CD canvas attribute SIZE (not IUP attribute size) must be set
whenever the canvas size is changed.

  CD also has an advantage that you can export your drawing to a metafile,
like PDF or SVG. But in this case you would have to draw everything using
CD, and not use the glcontrols. Notice that some IUP controls can still be
used on top of the drawing to enter values, for instance with IupText. But
I'm not seeing the whole picture of your application to know if this is
actually better for you.

Best,
Scuri


2017-07-06 20:18 GMT-03:00 Milind Gupta <[email protected]>:

> Hi Antonio,
>       I tried drawing on the glcanvas box using CD library. The drawing
> works but as expected when I clear the canvas during a resize and redraw it
> also erases the controls that were on the canvas box. Is there a proper way
> to do this?
>       Only reason I am trying to use CD is because I am more familiar with
> it and feels easier to use than OpenGL.
>
> Thanks,
> Milind
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to