----- Original Message -----
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.
This is the exception I'm getting:
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.Component.processMouseEvent(Component.java:5096)
at
java.awt.Component.processEvent(Component.java:4890)
at
java.awt.Component.dispatchEventImpl(Component.java:3598)
at
java.awt.Component.dispatchEvent(Component.java:3439)
at
java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at
java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
-Roy
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
--- Roy Duffy <[EMAIL PROTECTED]> escreveu:
> I've
seen a posting back in May about a
possible bug
> in either the
> Text2D class or the Texture2D class, but I couldn't
> find any resolution
> on
the problem.
> Now I've hit the problem too and
I'm thinking that
> it's a bug.
> The problem is I get an "illegal image size"
> exception when I try to
> call
setString() on a Text2D object. I'm guessing
> that it's trying to
> create an
image that's not a power of 2.
> I've attached a
sample program that demonstrates the
>
problem. If you
> click on the image, the
text should alternate
> between "Java" and
"3D",
> but it throws the exception after the
first click.
> Please check it out.
> Thanks.
>
-Roy
>
>
> ATTACHMENT part 2
application/x-unknown-content-type-java_auto_file
name=Text2dTest.java
_______________________________________________________________________
Yahoo! GeoCities
Tudo para criar
o seu site: ferramentas f�ceis de usar, espa�o de sobra e acess�rios.
http://br.geocities.yahoo.com/
---
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