Commit Graph

78 Commits

Author SHA1 Message Date
Alexei Dobrohotov 20e799dadc Use Rig/MorphGeometry state for its child geometry
Cherry-pick of ed44095cdc from 0.48 branch
2023-03-06 00:54:02 +00:00
clang-format-bot ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
psi29a b551e69b6f #5534 remove OSG 3.4 support and require at least 3.6.5 support 2022-08-09 21:07:28 +00:00
Bo Svensson c9c8d02332
fixes a crash (#3183)
This PR fixes a crash caused by the improperly ensured lifetime of RigGeometry::mSourceGeometry. mSourceGeometry was not adequate to ensure mSourceGeometry would outlive mGeometry because we extend mGeometrys lifetime beyond this lifetime by passing mGeometry to the draw traversal instead of this.
In addition,

We add important comments.
We detect and prevent generally unsafe operations in high level code.
We add a sprinkling of const to help clarify intentions.
2021-10-23 10:31:46 +02:00
Dan Church 42bd10f356
Fix FTBFS against older versions of osg
Bring back osg version guard.

Drawable::dirtyGLObjects wasn't available until OpenSceneGraph-3.5.10.
2021-10-13 13:55:16 -05:00
Bo Svensson b0132be53f
do not dirty unchanged arrays (#3164)
This PR proposes a simple change to `RigGeometry` `dirtyGLObjects` logic.

1. We will avoid dirtying unmodified arrays.
2. We can drop an osg version guard since `Drawable::dirtyGLObjects` is not nearly as harmful as `Geometry::dirtyGLObjects`.
3. We will avoid crashes in an as yet unfinished future PR concerning `Array` sharing improvements.
2021-10-12 13:47:42 +02:00
Bo Svensson c2d836c6c4
optimises riggeometry.cpp (#3165)
We skip this during node path iterations. this is not a node we are interested in.
We avoid allocating a new mGeomToSkelMatrix per frame and avoid a ref_ptr associated with its update.
We speed up a search for the Skeleton node by adding a continue; condition prior to an expensive dynamic_cast.
2021-10-10 18:37:34 +02:00
Alexei Dobrohotov 9f08dc9968 Revert "Merge branch 'skinning' into 'master'"
This reverts merge request !327
2020-10-08 23:24:28 +00:00
Alexei Dobrohotov 6be808e301 RigGeometry: convert some pairs to structs 2020-10-08 03:05:59 +03:00
bzzt lost a hitlab login 26ab176389 profiling
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
bzzt d684f1a78f terrainbased objectpaging
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:27 +02:00
bzzt 4ab93aeffe Do not allocate empty callbacks in the RigGeometry 2019-03-14 12:37:41 +04:00
Andrei Kortunov 3032b177a1 Remove redundant includes 2019-02-23 08:02:12 +04:00
Chris Djali cb5a57e41b
Merge pull request #1547 from AnyOldName3/osgshadow-test-vdsm
Shadows
2019-02-20 15:35:49 +00:00
Andrei Kortunov 60c9806d62 Share RigGeometry node data 2019-02-03 13:09:49 +04:00
AnyOldName3 8482236a82 Merge remote-tracking branch 'upstream/master' into osgshadow-test-vdsm 2019-01-24 23:09:23 +00:00
Andrei Kortunov 8e6fd348d1 RigGeometry optimization: optimize geometry optimization 2019-01-09 21:01:33 +04:00
Andrei Kortunov 254f01b89d RigGeometry optimization: vector iteration is more cheap than map iteration 2019-01-09 11:52:11 +04:00
AnyOldName3 53188f61fc Fix animation bug with VAOs 2018-12-18 19:44:30 +00:00
Bret Curtis fc19c842cf
Revert "fix a rig bug visible with OSG_VERTEX_BUFFER_HINT=VAO" 2018-12-13 20:09:46 +01:00
mp3butcher 7a85e10d2f fix a rig bug visible with OSG_VERTEX_BUFFER_HINT=VAO 2018-12-02 23:36:27 +01:00
AnyOldName3 0124be5713 Merge upstream/master 2018-10-10 21:23:19 +01:00
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 2018-10-09 10:21:12 +04:00
Andrei Kortunov 87394f2ebb Revert "Take in account transformations of NiTriShape and NiSkinData in skinning (bug #4437)"
This reverts commit 09427d3f5e since the
fix is not entirely correct.
2018-09-29 16:21:40 +04:00
Andrei Kortunov 09427d3f5e Take in account transformations of NiTriShape and NiSkinData in skinning (bug #4437) 2018-09-16 14:38:58 +04:00
Andrei Kortunov ff241fb787 Optimize skinning (task #4605) 2018-08-25 20:45:59 +04:00
AnyOldName3 80082308f0 Merge upstream (shadermanager log system revamp) 2018-08-17 18:22:13 +01:00
Andrei Kortunov 1452684d9e Use new logging system for components 2018-08-14 19:42:41 +04:00
AnyOldName3 6286f5a1d4 Ensure RigGeometry child geometries have sensible bounds without actually computing them. 2018-08-08 23:24:57 +01:00
scrawl 2e58024f1c Fix intersections with Rig/MorphGeometry, was caused by an issue in the LineSegmentIntersector not respecting the cullingActive flag of a drawable. 2017-09-03 14:14:15 +00:00
scrawl 5e790b567e Fix node path issue
Needs to be set so that the 'cullingActive' flag of the node path's end can be checked
2017-09-01 22:12:40 +00:00
scrawl 4bef8260ab Add const qualifiers 2017-09-01 21:42:36 +00:00
scrawl 209e139aa8 Move double buffering implementation inside RigGeometry
The double buffering is an implementation detail so it should be handled as such, rather than mandating the scene graph to be structured in a certain way.

Override accept(NodeVisitor&) instead of using callbacks.
2017-09-01 21:42:34 +00:00
scrawl 29556a1802 More consistent wording of errors/warnings
A Warning indicates a potential problem in the content file(s) that the user told OpenMW to load. E.g. this might cause an object to not display at all or as intended, however the rest of the game will run fine.

An Error, however, is more likely to be a bug with the engine itself - it means that basic assumptions have been violated and the engine might not run correctly anymore.

The above mostly applies to errors/warnings during game-play; startup issues are handled differently: when a file is completely invalid/corrupted to the point that the engine can not start, that might cause messages that are worded as Error due to the severity of the issue but are not necessarily the engine's fault.

Hopefully, being a little more consistent here will alleviate confusion among users as to when a log message should be reported and to whom.
2017-03-04 21:48:31 +01:00
scrawl 30b101b175 Fix build error in OSG_USE_FLOAT_MATRIX=OFF mode due to a double implicit conversion to double (pun doubly intended) 2017-02-03 06:49:34 +01:00
scrawl 84a92e665c Improve performance in RigGeometry by optimizing for the most common case of identity geomToSkelMatrix 2017-02-03 02:18:44 +01:00
scrawl eae35af13d Check if the bounding box changed before calling dirtyBound() 2016-12-17 00:23:22 +01:00
scrawl c0faeea938 RigGeometry check if mesh has normals (Fixes #3667) 2016-12-15 22:39:21 +01:00
scrawl d5f497c47d Pass the node path instead of the node visitor 2016-07-02 19:27:19 +02:00
scrawl 6fa95e72c5 Pass the traversal number instead of the node visitor 2016-07-02 19:26:11 +02:00
scrawl 824cd3be22 Do not set _boundingBoxComputed which is no longer used 2016-06-14 22:25:25 +02:00
scrawl 8052225460 Remove leftover call to setTexCoordArrayList 2016-03-23 22:56:04 +01:00
scrawl cc0afe901f Store a pointer to tangents array to avoid potential type casting issue 2016-03-23 17:03:04 +01:00
scrawl d1f6169889 Add special handling of RigGeometry tangents in ShaderVisitor 2016-03-23 16:48:41 +01:00
scrawl 95e80e7eff RigGeometry: don't directly modify the primitive set list
This is to ensure that an element buffer object will be assigned to the primitive sets if necessary.
2016-03-23 00:10:22 +01:00
scrawl c73ec71123 Revert "Store the RigGeometry's source vertices and normals directly"
This reverts commit 7a347e3483.
2016-03-22 23:28:57 +01:00
scrawl 60c8c4fdda Revert "Animate tangents in RigGeometry"
This reverts commit 9cf963b751.
2016-03-22 23:28:52 +01:00
scrawl 9cf963b751 Animate tangents in RigGeometry 2016-03-22 22:14:35 +01:00
scrawl 7a347e3483 Store the RigGeometry's source vertices and normals directly 2016-03-22 22:01:56 +01:00
scrawl 1abb77f8a1 Cleanup 2016-03-11 19:18:51 +01:00