Bug 1329 - SceneGraphObject read capability bits set to true by default and this is not configurable.
Summary: SceneGraphObject read capability bits set to true by default and this is not ...
Status: RESOLVED FIXED
Alias: None
Product: Java3D
Classification: General
Component: core (show other bugs)
Version: 2.4.0
Hardware: All all
: P4 normal
Assignee: Phil Jordan
URL:
Depends on:
Blocks:
 
Reported: 2016-10-19 23:15 CEST by Phil Jordan
Modified: 2019-03-29 14:19 CET (History)
1 user (show)

See Also:
Type: DEFECT
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Jordan 2016-10-19 23:15:02 CEST
The read capability bits in Scene Graph Objects are convenient but in setting this system up the developer responsible has broken the compile system. 

It's possible that the compile system was altered at some point and did not consider the red caps system, I'm not sure exactly which came first, but I suspect the read caps is the point of breakage.

This has an enormous impact on the compile() function of Java3D, effectively meaning that compile no long does anything at all, see the docs/perf_guide.txt under the –Compile section, neither of these 2 excellent steps can be taken whilst read capabilities are turned on.
Here is the piece of code that needs to be completed
void setDefaultReadCapabilities(int[] bits) {
        if (true /*VirtualUniverse.mc.defaultReadCapability*/) {
            for (int i=0; i < bits.length; i++) {
                setCapability(bits[i]);
            }
        }
    }

The TransformGroupRetained and NodeRetained require isStatic() to be true in order to flatten or merge them respectively, however with read capabilities turned on this is never true, so nothing is ever flattened or merged.

The performance benefits of turning the default read capabilities off can be shown to be enormous, though it requires a large complex scene graph, which is not easy to build as a simple test case.

There was no read caps system in the 1.3.2 code.

1.4.0 introduced read caps but with no conditional, so they were always on and possibly compile stopped working then.

The 1.5.1 initial source release contained the line as seen now, which suggests a desire to have a conditional but no actual flag set
 
Also note there are several other bugs in Java3D that prevent some compilation from happening, and these need to be addressed as separate bugs.
Comment 1 Phil Jordan 2016-10-26 02:01:54 CEST
Fixed in Branch 1.7.0