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

Home » Public Forums » archive » Instance drawing + IDLgrVolume
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: Instance drawing + IDLgrVolume [message #34063 is a reply to message #33973] Wed, 12 February 2003 08:38 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"Sebastian" <s@visita2.die.upm.es> wrote in message
news:Pine.LNX.4.44.0302121059190.1555-100000@visita2.die.upm .es...
> Hey all,
>
> I recently discovered instance drawing for drawing an interactive 3D
> cursor (using /DRAW_INSTANCE) over a volume (rendered with
> CREATE_INSTANCE=1), to my big surprise it both works really fast and
> shows only parts of the cursor that are not hidden by the volume.

Instancing is also useful in a more general sense when you have a
complicated scene that takes a long time to render and you want to draw
small, fast dynamic stuff over it, like cursors.

As you have seen, this works very well for volumes because they take so long
to render.

> My question is: How does the cursor (just a polyline) know where the
> volume begins? How does instance drawing work for IDLgrVolumes? Is there
> somewhere a hidden depthmap for the volume or is the cursor drawn first
> and then the parts of the volume where the cursor is are re-rendered?

When you create the instance, IDL saves the color buffer and the depth
buffer. If you drew the volume with the ZBUFFER property set, there is
information in the depth buffer that was generated as the volume was
rendered.

When you draw the saved instance, IDL writes the saved color and depth
buffers to the device, essentially putting you back to the same state you
were in after the initial draw used to create the instance.

> Anyway, is there a way to get to know which parts of the window have been
> updated by the cursor?

You could read the depth or color buffer before and after the cursor draw
and compare.

Karl
[Message index]
 
Read Message
Read Message
Previous Topic: missing a dimension in IDLgrVolume
Next Topic: Anyone using IDL_Tools DLM on Mac OS X?

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

Current Time: Thu Dec 04 13:35:40 PST 2025

Total time taken to generate the page: 0.32302 seconds