xml3d / xml3d.js

The WebGL/JS implementation of XML3D
Other
74 stars 25 forks source link

Visibility Bug: setting a group's visibility before a multimesh is inserted fails #57

Closed uykusuz closed 10 years ago

uykusuz commented 10 years ago

I have a group in the DOM tree. For that group I create a multimesh element in Javascript and append it to the group. If I set the group's visibility to false before appending the mesh the visibility is not applied correctly: the object is still visible and the far plane is wrong. When I append the mesh element and set the group's visibility to false afterwards everything works as expected.

ksons commented 10 years ago

Sorry. I accidentally deleted lachsen's comment:

Strangely, the test we had in the framework did not detect the bug: Objects were not rendered because they were culled. We currently don't have any stats to check for culled objects (or do we?), so it's hard to > write a proper test. Thus, I only added a fix for now without a proper test.

For those tests, frustum culling should be disabled to simplify the test setup. The proper setting of the frustum culling option should be checked within tests that depend on visibility but not on culling.

ksons commented 10 years ago

Fixed in 2f37c0df60fdc51b4c73a5bdcdebdebdbef70403