To all,
I have uncovered bugs and/or inconsistencies regarding Behavior execution,
the normal rendering process and View.renderOnce().
Enclosed are two programs, RenderOnce1 and RenderOnce2. Both are very
similar but illustrate different bugs/inconsistencies. Both provide a button
labeled "switch mode" at the bottom to switch between normal rendering mode
and "stop-time" rendering mode. In "stop-time" mode, View.stopView() is
called and the user advances to the next frame by clicking the top button
labeled "renderOnce" which simply calls View.renderOnce(). Both programs
begin in "stop-time" mode. A single Behavior in both programs changes the
Texture of a Box and the scale of the TransformGroup above the Box to
alternate frame by frame between blue-big and yellow-small. Frame speed has
been held to a minimum of 1 fps to make the process visually clearer. The
programs use different algorithms to change the texture of the Box.
RenderOnce1 creates one texture and (by using ImageComponent.byReference)
draws into the texture to alternate it's color between blue and yellow.
RenderOnce2 creates two textures (one blue, one yellow) and calls
Appearance.setTexture() to alternate between the two.
Desired result is the same for both programs, both modes. --
blue-big/yellow-small.
Actual results:
RenderOnce1 normal -- blue-small/yellow-big. WRONG (inconsistent)
RenderOnce1 stop-time -- blue-big/yellow-small. RIGHT
RenderOnce2 normal -- blue-big/yellow-small. RIGHT
RenderOnce2 stop-time -- unpredictable pairings of size and color. WRONG
There seems to be some variation in results depending on Texture size and
minimum fps. Could it be that there is a lack of cooperation between
different threads (one changing the Transform3D and the other changing the
Texture)?
I'm using NT 4.0, 466Mh, Celeron, no acceleration.
Raffi
<<RenderOnce1.java>> <<RenderOnce2.java>>
RenderOnce1.java
RenderOnce2.java