Commit graph

468 commits

Author SHA1 Message Date
Ryan Huffman
18a166bee8 Fix models not settings textures if not loaded 2016-12-16 15:05:17 -08:00
Andrew Meadows
ee6a9f4506 adding profile stats relating to avatar CPU costs 2016-12-16 13:41:31 -08:00
Ryan Huffman
7bb2755913 Add chrome tracing support 2016-12-16 01:14:01 -08:00
Anthony Thibault
23aa626755 Destroy render scene & engine before Application is destroyed
Many render items/payloads contain smart pointers back to the
objects that added them to the scene, including entity and avatar
objects. Currently, those render items are destroyed when the
scene is destroyed very late in the application life-cycle.

There are rare crashes that can occur when these render items are
destroyed. Possibly, due to them referencing objects that have
already been destroyed via raw pointers. In an effort to
eliminate these crashes, we now destroy the scene earlier, within
Application::aboutToQuit() which is connected to the
QCoreApplication::aboutToQuit signal.  Also, we guard against null
scene pointer dereferences.  Any location that accesses the scene
off the main thread, now checks the validity of the scene pointer.
2016-10-25 15:28:37 -07:00
Brad Hefta-Gaub
7fe16442fa make calculateTextureInfo thread safe 2016-10-01 15:47:17 -07:00
David Rowe
0cf3f6e953 Fix texture count and size getting stuck on 0 2016-09-13 13:03:06 +12:00
David Rowe
68499f49ad Fix count of textures 2016-09-10 10:15:13 +12:00
Brad Hefta-Gaub
e1845e2c3f add support for renderInfo properties to model entities 2016-08-31 15:00:21 -07:00
Andrew Meadows
b95cb566cd fix collision mesh for non-trivial registration 2016-08-24 22:26:56 -07:00
Andrew Meadows
19cd4648ad scale collision render mesh correctly 2016-08-24 22:26:56 -07:00
Andrew Meadows
68dd66daec create collision render geometry only when needed 2016-08-24 22:26:56 -07:00
Andrew Meadows
b0a0293e6e move compoundResource out of Model class 2016-08-24 22:26:56 -07:00
Andrew Meadows
fe4198530f don't render raw compound collision geometry 2016-08-24 22:26:56 -07:00
Andrew Meadows
329c5432ed _showCollisionHull --> _showCollisionGeometry 2016-08-24 22:26:56 -07:00
Andrew Meadows
481d6990a3 trigger collision shape render mesh creation 2016-08-24 22:26:56 -07:00
Andrew Meadows
26f5d3cfaa fix render geometry for collision shapes 2016-08-24 22:26:56 -07:00
Andrew Meadows
6b0ae654ba cleanup logic around creating RenderItems 2016-08-24 22:26:56 -07:00
Andrew Meadows
d8fa0d1dd1 segregateMeshGroups() --> createRenderItems() 2016-08-24 22:25:45 -07:00
Andrew Meadows
726928c14c creae collision Geometry from mesh 2016-08-24 22:25:45 -07:00
Seth Alves
87dbfa7e47 add -Wsuggest-override to compile flags and deal with fallout 2016-08-18 09:51:41 -07:00
SamGondelman
ae9fb3768c CR notes 2016-08-08 17:45:25 -07:00
SamGondelman
328d3128fa merge from master 2016-08-08 13:30:39 -07:00
Ryan Huffman
4f9be2ae72 Fix camera position not being set for angular loading 2016-08-08 08:53:06 -07:00
Ryan Huffman
77e993510e Cleanup implementation of angular loading 2016-08-08 08:53:05 -07:00
Ryan Huffman
c594dcdf9f Add priority loading for model entities 2016-08-08 08:52:29 -07:00
SamGondelman
dd51e0e38f merge from master 2016-08-05 17:04:45 -07:00
SamGondelman
771e105fa2 Merge remote-tracking branch 'upstream/master' into loadingFade 2016-08-05 16:52:01 -07:00
Brad Hefta-Gaub
83280aa3f2 implement support for updating the render items of models when they finish their fade 2016-08-05 10:11:07 -07:00
SamGondelman
b6e73e06a2 merge from master 2016-08-04 13:34:38 -07:00
Seth Alves
c743cf379e use loadCollisionModelURLFinished when collisions model is finished 2016-08-03 11:31:51 -07:00
Seth Alves
ad4fc8c656 merge from upstream, don't hold up enabling of physics if a collision hull fails to load 2016-08-03 10:42:15 -07:00
Stephen Birarda
5d3e125a06 make failed geomtetry request not hold physics 2016-08-02 16:32:41 -07:00
Seth Alves
b953e6f0ff when an avatar URL fails, switch to the default 2016-08-01 18:12:30 -07:00
SamGondelman
313ba87fce fade on texture load 2016-08-01 14:47:20 -07:00
Andrew Meadows
d876251f1e release geometry refs in Model::deleteGeometry() 2016-07-24 19:17:39 -07:00
Andrew Meadows
3e43859139 setCollisionModelURL() more symmetric with setURL() 2016-07-13 15:13:35 -07:00
Andrew Meadows
4bebb682dc namechange: fetchResource --> getGeometryResource 2016-07-13 15:13:35 -07:00
Andrew Meadows
9f7d2cf263 NetworkGeometry --> GeometryResourceWatcher
Model class gets render and collision geometries with watchers
also changed names for readability
2016-07-13 15:00:12 -07:00
Seth Alves
11542aeca2 pick against avatar's capsule and then against the T-pose mesh 2016-07-07 16:36:25 -07:00
Seth Alves
5f9c7b6ea5 trying to take joint information into account when raypicking against models 2016-06-29 17:02:49 -07:00
Seth Alves
d53c7ae5d8 experimenting 2016-06-29 12:39:04 -07:00
Andrew Meadows
5d5dc2837b fix comment 2016-06-20 17:29:20 -07:00
Andrew Meadows
c73757f740 use many colors for collision hull rendering 2016-06-03 10:47:54 -07:00
Brad Hefta-Gaub
06cb625d09 Merge pull request #7959 from hyperlogic/tony/improved-avatar-mixer-precision
Improved Avatar Mixer Rotation Precision
2016-05-25 17:14:12 -07:00
Seth Alves
40e862cf9e quiet gcc 5 warnings 2016-05-21 16:53:01 -07:00
Anthony J. Thibault
55b0060df9 Convert JointData from relative frame to absolute. 2016-05-16 17:48:52 -07:00
Anthony J. Thibault
641e152699 Eye tracking bug fix and debug rendering improvement
* Bug fix for eye tracking in HMD, the "up" orientation of your eyes now match your head.
* DebugDraw: added drawRay method.
* Application: Renamed preRender to postUpdate
* AvatarManager: added postUpdate method that iterates over all avatars.
* MyAvatar: Renamed preRender to preDisplaySide
* MyAvatar: split preRender code into postUpdate and preDisplaySide.
* Removed "Show who is looking at me", "Render focus indicator" and "Render lookat target" debug draw.
* Split "Show Look At Vectors" into "Show My Look At Vectors" and "Show Other Look At Vectors", to make it easier to debug eye tracking.
* "Show Look at Vectors" now draws the right eye red and the left eye blue.
* Removed Avatar and MyAvatar renderBody
* Removed look at rendering from head.
* GLMHelpers: Bugfix for generateBasisVectors when up primary and secondary axis were orthogonal
2016-05-08 16:20:32 -07:00
Anthony Thibault
865a77ae20 Model: fixed two crash issues when changing avatars
* When the GeometryReader has the last ref to the GeometryResource ptr
  It needs to hold on to the reference until invokeMethod is completed.
  Otherwise, invokeMethod will call a method on a deleted object, leading
  to memory corruption or crashes.

* When the Model URL is changed, the clusterMatrices are invalided and the
  RenderItemsSets are cleared.  However, there still might be renderItems in
  the scene pending changes list that might refer to those RenderItems and their
  clusterMatrices.  We need to guard against this access to prevent reading from
  memory that was previously freed.

Both of these issues were uncovered using the [avatar-thrasher](https://gist.github.com/hyperlogic/d82a61d141df43d576428501a82c5ee6) test script.
2016-04-02 21:48:22 -07:00
Anthony J. Thibault
5e81cccc6c Merge branch 'master' into tony/culling-fixes 2016-04-01 09:29:46 -07:00
Anthony J. Thibault
bc967f0ab0 Model: update renderItems when items are added to the scene.
* Renamed enqueueLocationChange to updateRenderItems
* Call updateRenderItems when models are added to the scene.

This will fix entity render bounds being incorrect when they are first added to the scene,
then later being correct after a position update.

* Renamed getMeshPartBound to getRenderableMeshBound.
* Avatar now uses getRenderableMeshBound() to do boundingRadius vs frustum check.
* Model::getRenderableMeshBound now returns a more accurate bound, because it is the same one used for rendering.

This will fix avatar freezing, when they are in the corner of your frustum.
This was due to matrices not being updated because the avatar had to a small bounding sphere.
2016-03-31 14:59:27 -07:00