Justin Couch wrote:

>Kelvin Chung wrote:
>
>>Hi,
>>
>>   I can reproduce the problem but it seems to me VRML
>>did not load the texture completely before passing it
>>to Java3D.
>>
>>Please check the loader source code. For your reference
>>our utility TextureLoaders use an Image observer to
>>make sure Texture load completely before the
>>constructor return.
>>
>
>
>AFAIK, currently we don't use any checks on the images for completion of
>loading. This is due to the way that images are handled for textures -
>we take and resize them if they are not a power of 2. I think Alan uses
>a MediaTracker to validate the copy, but maybe if the images are already
>the correct dimensions it may slip through the cracks.
>
    Here is what I'm doing.  I beleive this will always pause till the
image is loaded.  At least the code I stole it from over the new seemed
to thinkso, ala the documentation.  Anyone know differently?

private  BufferedImage toBufferedImage(Image image, int comp) {
        // This code ensures that all the pixels in
        // the image are loaded.

        image = new ImageIcon(image).getImage();


--
Alan Hudson
President: Yumetech, Inc.                      http://www.yumetech.com/
Web3D Open Source Chair        http://www.web3d.org/TaskGroups/source/

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