comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Persistent Object Graphics Not Persistent in Resizeable Windows
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Persistent Object Graphics Not Persistent in Resizeable Windows [message #9204 is a reply to message #9157] Fri, 06 June 1997 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
[A copy of this article was sent to the cited author.]

Phil Williams writes:

> There is a suggestion in one of the manuals that retain=2 should not be
> used for draw widgets that are objects (grpahics_level=2). Instead use
> /expose_events keyword and then have something like this
>
> if event.id eq info.drawID then begin
> if event.type eq 4 then info.thisWindow->draw, info.thisView
> endif
>
> in the event handler to draw the window when it's exposed.
>
> I added this to your sample code and the axes appear fine when the
> widget is resized.

Thanks to Phil Williams and RSI for pointing out my problems
with this code. In fact, setting the Retain flag for object
windows is NOT a good idea. Removing it got my code working
fine.

Here is what I heard from RSI about this issue:

> As far as 'retain' goes. If you have are using a widget application
> I would recommend that you always set your retain to 0 then process
> the EXPOSE event in your event handler by calling the draw method
> on your window object.
>
> This is mainly a performance/memory issue. Using retain of 0 allows
> OpenGL to double buffer the window and drawings occur much faster.
> Since you have the window retained already (the view/scene object)
> you can make the determination of when to reissue a draw command.
> With retain=2, OpenGL has a buffer of the graphic, IDL has a buffer
> of the graphic (so it can repair the bits), and you have a 'buffer'
> to the graphic (the object). Under IDL 4.x this wasn't the case,
> so retain of 2 was the best choice (and still is for level 1
> graphics).

Good information to have. I'll update the data base and add a tip
to my web page.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Customizable IDL Programming Courses
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
IDL 5 Reports: http://www.dfanning.com/documents/anomaly5.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: ENVI and complex data
Next Topic: Re: Newbie Q: Color plot of discrete points

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 21:31:43 PDT 2025

Total time taken to generate the page: 0.23864 seconds