I'm using java3d 1.3 beta1.

I have hit some bug when updating many nodes. By my mistake, on button
change, same textures in textureunitstates were enabled and disabled few
times (to be exact, enable,enable,disable,disable,disable). This killed
renderer with following error

java.lang.NullPointerException
at javax.media.j3d.RenderBin.updateObject(RenderBin.java:546)
at javax.media.j3d.MasterControl.updateMirrorObjects(MasterControl.java:
2565)
at javax.media.j3d.MasterControl.runMonitor(MasterControl.java:3230)
at javax.media.j3d.MasterControl.doWork(MasterControl.java:2817)
at javax.media.j3d.MasterControlThread.run(MasterControlThread.java:28)

I don't know if it helps, but TextureUnitStates were as follows on some
shapes

[0] - SPHERE_MAP, MODULATE, RGB
[1] - explicit texcoords (TexCoordGeneration set, but disabled), DECAL, RGBA

and on other shapes

[0] - null
[1] - explicit texcoords (TexCoordGeneration set, but disabled), DECAL, RGB


BTW, if we are subject, in second case, will using REPLACE be faster
than DECAL for non-alpha texture ? It should look the same, I just
wonder if there is any gain here.

Last time info - even when I fixed my bug, I'm able to reproduce similar
thing on one of models (but rest works ok).

java.lang.NullPointerException
at javax.media.j3d.AttributeBin.reInsertTextureBin(AttributeBin.java:285
)
at javax.media.j3d.RenderBin.updateObject(RenderBin.java:546)
at javax.media.j3d.MasterControl.updateMirrorObjects(MasterControl.java:
2565)
at javax.media.j3d.MasterControl.runMonitor(MasterControl.java:3230)
at javax.media.j3d.MasterControl.doWork(MasterControl.java:2817)
at javax.media.j3d.MasterControlThread.run(MasterControlThread.java:28)

Replacing [0] on some shapes from null to (SPHERE_MAP, MODULATE, RGB),
even if it is not visible, fixes it (I cannot longer reproduce it). But
I want to have ability to use only one stage of texturing, even if more
unit states are allocated.

I have to allocate more, because geometry is defined in this way -
explicit texture coordinates are allocated to tus[1], so I have to put
empty tus[0] there. It seems to be terrible waste for me to put some
real texturing there, only to REPLACE-mode it later.


Artur

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