magnum-examples icon indicating copy to clipboard operation
magnum-examples copied to clipboard

Update ArcBallCamera.h

Open ttnghia opened this issue 4 years ago • 2 comments

Change the frustum clip distance. The current 'far' clip is too small, thus some large objects can be cut off.

ttnghia avatar Jul 05 '20 07:07 ttnghia

Hmm, this could cause depth precision issues on certain browsers / platforms which use a 16-bit depth buffer by default. I'm not sure what's the situation right now but not so long ago Firefox suffered quite a lot from this (see https://github.com/mosra/magnum-examples/issues/34, https://bugzilla.mozilla.org/show_bug.cgi?id=1202387).

Maybe a better option would be to make this configurable from outside? So you extend it where needed and leave in safe bounds where the default is enough.

mosra avatar Jul 05 '20 10:07 mosra

Sure. I changed that. Now the near/far parameters are optional. This is the prerequisite for my next example.

ttnghia avatar Jul 06 '20 02:07 ttnghia