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

Home » Public Forums » archive » idlgrbuffer draw :create_instance and draw_instance question....
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
idlgrbuffer draw :create_instance and draw_instance question.... [message #80858] Thu, 19 July 2012 15:07 Go to next message
George Millward is currently offline  George Millward
Messages: 29
Registered: February 2000
Junior Member
Hi there,

I have an object graphics code that writes .png files offline (runs under cron). So I use the idlgrbuffer instead of drawing to a window. Anyhow, I have noticed that the drawing to the buffer is quite computationally intense so I've been trying to speed things up.

I see the 'create_instance' and 'draw_instance' keywords in the draw method. These seem to have something to do with rendering the parts of an image which are unchanged separately from the changing part....but the help documentation is somewhat terse.

Can anyone explain what this does - any examples ?

Any other tips for speeding up rendering to an idlgrbuffer object ?

Cheers

George.
Re: idlgrbuffer draw :create_instance and draw_instance question.... [message #80914 is a reply to message #80858] Mon, 23 July 2012 15:43 Go to previous message
George Millward is currently offline  George Millward
Messages: 29
Registered: February 2000
Junior Member
On Monday, July 23, 2012 7:28:13 AM UTC-6, nata wrote:
> Hi George,
>
> I use the CREATE_INSTANCE and DRAW_INSTANCE a lot but not in the IDLgrBuffer. I use it in the IDLgrWindow These 2 keywords are very useful when you have a lot of graphical objects in your view and you don't need render all of them.
>
> What I do is separate the graphical objects in 2 models. One containing the static components (the objects that won't change) and another model containing the dynamic objects.
> The dynamic objects are those ones that change in time, position, color, etc. and you have to render all the time.
>
> Then, if you want to speed things up (and if I remember correctly), you can proceed that way :
>
> dynamic_model->SetProperty, /HIDE
> window->Draw, view, /CREATE_INSTANCE
>
> static_model->SetProperty, /HIDE
> view->SetProperty, /TRANSPARENT
> dynamic_model->SetProperty, HIDE=0
>
> After this, the command window->Draw, view, /DRAW_INSTANCE will only render the dynamic objects contained in the dynamic model and everything will be less computationally intense.
>
> Hope it will be useful to you !
> nata

Nata,

Very interesting - I'll give it a go and report back how this works with the idlgrbuffer.

Cheers

George.
Re: idlgrbuffer draw :create_instance and draw_instance question.... [message #80927 is a reply to message #80858] Mon, 23 July 2012 06:28 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi George,

I use the CREATE_INSTANCE and DRAW_INSTANCE a lot but not in the IDLgrBuffer. I use it in the IDLgrWindow These 2 keywords are very useful when you have a lot of graphical objects in your view and you don't need render all of them.

What I do is separate the graphical objects in 2 models. One containing the static components (the objects that won't change) and another model containing the dynamic objects.
The dynamic objects are those ones that change in time, position, color, etc. and you have to render all the time.

Then, if you want to speed things up (and if I remember correctly), you can proceed that way :

dynamic_model->SetProperty, /HIDE
window->Draw, view, /CREATE_INSTANCE

static_model->SetProperty, /HIDE
view->SetProperty, /TRANSPARENT
dynamic_model->SetProperty, HIDE=0

After this, the command window->Draw, view, /DRAW_INSTANCE will only render the dynamic objects contained in the dynamic model and everything will be less computationally intense.

Hope it will be useful to you !
nata
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Using Widgets and Procedures
Next Topic: Identification of points after transformations

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

Current Time: Wed Oct 08 13:43:24 PDT 2025

Total time taken to generate the page: 0.00502 seconds