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

Reply via email to