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
|
|
|