Kynn,
If what you say is true it looks like a bug ;-). I cannot reproduce it in my
application.
Note that Sphere is a Group which contains a Shape3D... Check the source
code (java3d-utils-src.jar) if you suspect you have found a bug.
If you post an example people can verify it, then send it to SUN as a bug
report.
Hang in there - it can be frustrating, but there is (usually) a method to
the madness.
Sincerely,
Daniel Selman
-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Kynn Jones
Sent: Monday, July 02, 2001 3:50 PM
To: [EMAIL PROTECTED]
Subject: Help! Appearance: no capability to get renderingAttributes
I'm rapidly going insane here. The latest is that I'm getting a
javax.media.j3d.CapabilityNotSetException: Appearance: no capability to get
renderingAttributes
at
javax.media.j3d.Appearance.getRenderingAttributes(Appearance.java:415)
on an object for which I have explicitly set
RenderingAttributes.ALLOW_VISIBLE_READ and
RenderingAttributes.ALLOW_VISIBLE_WRITE.
Specifically:
Appearance app = new Appearance();
app.setCapability(Appearance.ALLOW_COLORING_ATTRIBUTES_READ);
app.setCapability(Appearance.ALLOW_COLORING_ATTRIBUTES_WRITE);
app.setCapability(Appearance.ALLOW_RENDERING_ATTRIBUTES_READ);
app.setCapability(Appearance.ALLOW_RENDERING_ATTRIBUTES_WRITE);
RenderingAttributes ra;
ra = new RenderingAttributes();
ra.setCapability(RenderingAttributes.ALLOW_VISIBLE_READ);
ra.setCapability(RenderingAttributes.ALLOW_VISIBLE_WRITE);
ra.setVisible(true);
app.setRenderingAttributes(ra);
ball = new Sphere(radius,
Sphere.ENABLE_APPEARANCE_MODIFY
| Sphere.ENABLE_GEOMETRY_PICKING,
app);
Using the debugger, if I dump the appearance in question, I get:
app = instance of javax.media.j3d.Appearance(id=761) {
ALLOW_COLORING_ATTRIBUTES_READ: 8
ALLOW_COLORING_ATTRIBUTES_WRITE: 9
ALLOW_TRANSPARENCY_ATTRIBUTES_READ: 10
ALLOW_TRANSPARENCY_ATTRIBUTES_WRITE: 11
ALLOW_RENDERING_ATTRIBUTES_READ: 12
ALLOW_RENDERING_ATTRIBUTES_WRITE: 13
ALLOW_POLYGON_ATTRIBUTES_READ: 14
ALLOW_POLYGON_ATTRIBUTES_WRITE: 15
ALLOW_LINE_ATTRIBUTES_READ: 16
ALLOW_LINE_ATTRIBUTES_WRITE: 17
ALLOW_POINT_ATTRIBUTES_READ: 18
ALLOW_POINT_ATTRIBUTES_WRITE: 19
ALLOW_MATERIAL_READ: 0
ALLOW_MATERIAL_WRITE: 1
ALLOW_TEXTURE_READ: 2
ALLOW_TEXTURE_WRITE: 3
ALLOW_TEXTURE_ATTRIBUTES_READ: 6
ALLOW_TEXTURE_ATTRIBUTES_WRITE: 7
ALLOW_TEXGEN_READ: 4
ALLOW_TEXGEN_WRITE: 5
ALLOW_TEXTURE_UNIT_STATE_READ: 20
ALLOW_TEXTURE_UNIT_STATE_WRITE: 21
javax.media.j3d.NodeComponent.forceDuplicate: false
javax.media.j3d.SceneGraphObject.capabilities: instance of
java.util.BitSetid=762)
javax.media.j3d.SceneGraphObject.retained: instance of
javax.media.j3d.ApperanceRetained(id=763)
javax.media.j3d.SceneGraphObject.compiled: true
javax.media.j3d.SceneGraphObject.live: true
javax.media.j3d.SceneGraphObject.liveOrCompiled: true
javax.media.j3d.SceneGraphObject.userData: null
javax.media.j3d.SceneGraphObject.nodeHashtable: null
It seems to me that the appearance has the correct bits set for
reading the rendering attributes. Why the error?
Actually a far more important question is: how can I avoid losing my
mind over bugs like this? I run into one like it every 3-4 hours.
This is the most bug-prone system I have ever worked with. How can
one be setting the specific bit in question and still get this kind of
error message???
KJ
===========================================================================
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".