Roy,
I was confused,
but I discover this bug only happens under Java 1.4.
If you use Java 1.3.1 there is no exceptions.
 
 
 
Se below :
Using Java 1.3 (sucessful) :
java -showversion -Dj3d.debug=true Text2dTest2
java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)
 
Java 3D 1.3, Windows version is 5.0 Build: 2195, Windows NT
[Display Driver] s3savg4.dll, S3 Inc. Savage4, Product 5
                 Version 12.1, Build 8009, VendorId 251552360
                 DeviceId 0x5333, SubSysId 0x8a22, Revision 0x69808
  [Desktop Mode] 1024x768 75 MHz, D3DFMT_X8R8G8B8
        [Device] Hardware Rasterizer
        [Device] Reference Rasterizer (AA)
 
Use S3 Inc. Savage4, Hardware Rasterizer
 
Create device :
Window 200x200 D3DFMT_X8R8G8B8, handle=3104ac, D3DMULTISAMPLE_NONE, D3DSWAPEFFEC
T_COPY, D3DFMT_D24S8
Max Texture Unit Stage support : 2
Max Simultaneous Texture unit support : 2
/********************************************************************************/
 
Now Using Java 1.4 (failed):
 
java version "1.4.0_01-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-ea-b02)
Java HotSpot(TM) Client VM (build 1.4.0_01-ea-b02, mixed mode)
 
Java 3D 1.3, Windows version is 5.0 Build: 2195, Windows NT
[Display Driver] s3savg4.dll, S3 Inc. Savage4, Product 5
                 Version 12.1, Build 8009, VendorId 386884200
                 DeviceId 0x5333, SubSysId 0x8a22, Revision 0x69808
  [Desktop Mode] 1024x768 75 MHz, D3DFMT_X8R8G8B8
        [Device] Hardware Rasterizer
        [Device] Reference Rasterizer (AA)
 
Use S3 Inc. Savage4, Hardware Rasterizer
 
Create device :
Window 200x200 D3DFMT_X8R8G8B8, handle=9049e, D3DMULTISAMPLE_NONE, D3DSWAPEFFECT
_COPY, D3DFMT_D24S8
Max Texture Unit Stage support : 2
Max Simultaneous Texture unit support : 2
java.lang.IllegalArgumentException: Texture:illegal image size
        at javax.media.j3d.TextureRetained.checkImageSize(TextureRetained.java:3
89)
        at javax.media.j3d.TextureRetained.setImage(TextureRetained.java:423)
        at javax.media.j3d.Texture.setImage(Texture.java:869)
        at com.sun.j3d.utils.geometry.Text2D.setString(Text2D.java:118)
        at Text2dTest2$1.mouseClicked(Text2dTest2.java:75)
        at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
 
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
 

Alessandro Borges
 
----- Original Message -----
From: Roy Duffy
Sent: Tuesday, October 08, 2002 7:59 PM
Subject: Re: [JAVA3D] Possible Text2d Bug

Hi Alessandro,
Thanks for responding.  I tried adding those lines and I still got the exception.  Then I tried using your code and I still got the exception.  What am I missing here?
It also doesn't seem like the type of exception I'd get if I didn't have a capability set.

Alessandro borges wrote:

 

Hi, Roy !

There is no Text2D bug.
you just forget to add the following lines :
 text.setCapability( Shape3D.ALLOW_GEOMETRY_READ);
 text.setCapability( Shape3D.ALLOW_GEOMETRY_WRITE);

See your code working in the zip file ;)

Alessandro


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.391 / Virus Database: 222 - Release Date: 19/09/2002

Reply via email to