David,

Since the texture swap happens within one behavior, the hw texture resources
will remain untouched, aka, the textures will not be freed and then recreated
again.

Charmaine Lee
Java3D Team


> Delivered-To: [EMAIL PROTECTED]
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
> Date: Wed, 13 Jun 2001 21:24:25 -0400
> From: David Yazel <[EMAIL PROTECTED]>
> Subject: [JAVA3D] Atomic nature of texture swaps
> To: [EMAIL PROTECTED]
>
> Question for the Sun Engineers :)
>
> If I have two shapes, one with texture A and one with texture B and within
> one behavior I swap their textures like this:
>
> Texture a = shapeA.getAppearance().getTexture();
> shapeA.getAppearance().setTexture(shapeB.getAppearance().getTexture());
> shapeB.getAppearance().setTexture(a);
>
> Can I be safe in assuming that this will not result in texture "a" from
> being unbound from the card and then sent back over? In other words if you
> ignore the texture binds until you have to send the data to the next frame,
> and at that point compare what you know is cached there with the needs of
> the objects are... then we are safe.  But alternatively if you handle a
> Appearance->texture reference count and flag the texture for removal as soon
> as the reference count reaches zero, then the texture could be dropped even
> though it is going to be referenced by another shape.
>
> Dave Yazel
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to