Re: view/model questions [message #65573] |
Thu, 12 March 2009 11:03 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> It is probably a mistake to try write IDL object graphics
> programs without reading the documentation. :-)
It's probably a mistake to write them without reading
Ronn's book Power Graphics in IDL, come to think of it.
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: view/model questions [message #65574 is a reply to message #65573] |
Thu, 12 March 2009 10:58  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
llo writes:
> I never read before this section on the IDL manual. It's so
> interesting.
It is probably a mistake to try write IDL object graphics
programs without reading the documentation. :-)
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: view/model questions [message #65578 is a reply to message #65575] |
Thu, 12 March 2009 09:55  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
llo wrote:
> Hi people,
>
> I've a window who draws a view. This view has the same size as the
> window and contains a model with a lot of graphical objects. The time
> to render this view is considerable...
First suggestion is to simplify your static objects. Decimate vertices.
Combine objects (one IDLgrLine with thousands of vertices draws faster
than hundreds of IDLgrLines with few verts). While you're on the right
path, simplifying your static model can only help.
> Then, I want to draw some "dynamic" graphical object over this view.
> This new "dynamic" objects can change with the mouse position.. So I
> need to do some redraws.
> Use only one view and model is not a good idea because the dynamic
> objects change for each mouse movement and the time to render the view
> is too much. So, the interaction sucks...
>
> If I separate the static and dynamic objects with 2 models and views
> and I only redraw the dynamic objects contained in the 2nd model, the
> "dynamic" view hides the static view beacuse has the same dimensions.
It is not "hiding" the static view, the static view is simply not being
drawn. When you call IDLgrWindow->Draw without keywords, it erases the
window.
> Then how can I do to separate this to create a good interaction
> redrawing only the "dynamic" objects.
What you want to do is called "instancing". Search for it in the IDL
help. You should see a section titled "redraw performance" that covers
this topic. Also see the IDLgrWindow->Draw docs.
-Rick
|
|
|