1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 18:49:54 +00:00
Commit graph

4884 commits

Author SHA1 Message Date
Andrei Kortunov
4d48c81998 Add move assignment operator and move constructor for the ESM::Variant 2021-03-13 22:28:13 +04:00
psi29a
cc6f08930b Merge branch 'alpha-meddling' into 'master'
Replace deprecated alpha test in shader visitor

Closes #4899

See merge request OpenMW/openmw!473
2021-03-13 08:13:19 +00:00
AnyOldName3
0431ba4c87 Merge branch 'alpha-meddling-shader-side-mip-meddling' into alpha-meddling 2021-03-13 01:23:30 +00:00
AnyOldName3
d52ae28b7a Fix linking on MacOS 2021-03-11 00:28:14 +00:00
psi29a
9f47190411 Merge branch 'now-it-blends' into 'master'
Convert blending factors properly for the character preview

See merge request OpenMW/openmw!644
2021-03-10 23:27:04 +00:00
AnyOldName3
cb2cbb4181 Convert blending factors properly for the character preview 2021-03-10 22:07:14 +00:00
AnyOldName3
450b971bb0 Merge branch 'gl4es-patch' into 'master'
gl4es: Delay feature detection until a context exists

See merge request OpenMW/openmw!626
2021-03-10 19:01:39 +00:00
AnyOldName3
deb184cdce Merge branch 'fix-build' into 'master'
Fix linking with `-DOPENMW_USE_SYSTEM_OSG=ON -DOSG_STATIC=ON`

See merge request OpenMW/openmw!640
2021-03-08 19:01:02 +00:00
Evil Eye
eb07818f13 Ignore agents without bounding boxes 2021-03-07 20:58:09 +01:00
Gleb Mazovetskiy
455be9dbbb Fix linking with -DOPENMW_USE_SYSTEM_OSG=ON -DOSG_STATIC=ON
1. CMake's built-in OSG finder does not use pkgconfig, so we have to
   manually ensure the order is correct for inter-library dependencies.

   https://gitlab.kitware.com/cmake/cmake/-/issues/21701

2. OSG plugin pkgconfig files are missing dependencies on the underlying
   libraries (e.g. freetype, png, jpeg), so we have to link them manually.

   https://github.com/openscenegraph/OpenSceneGraph/issues/1052
2021-03-06 21:17:52 +00:00
Gleb Mazovetskiy
4495b67d77 MyGUI HEAD compatibility
Makes OpenMW compatible with the current MyGUI HEAD at:
f93d4fb614

Refs #5806
2021-03-02 13:24:30 +00:00
Gleb Mazovetskiy
044e784072 gl4es: Delay feature detection until a context exists
gl4es feature detection does not work reliably with EGL.

If a context already exists, gl4es can instead reliably detect
the underlying GLES features from the context itself.

This requires gl4es to be configured with:

    -DNOEGL=ON -DNO_LOADER=ON -DNO_INIT_CONSTRUCTOR=ON

This also requires gl4es to have this fix: https://github.com/ptitSeb/gl4es/pull/271
2021-02-28 07:59:48 +00:00
psi29a
937549c99e Merge branch 'fix_still_actors' into 'master'
Make actor flee from a combat when cannot reach a target (#5851)

See merge request OpenMW/openmw!601
2021-02-26 23:25:05 +00:00
AnyOldName3
46a1715d8a Actually return something 2021-02-26 20:10:58 +00:00
AnyOldName3
16e8cf89af Fix compilation of tests with MSVC 2021-02-26 20:10:03 +00:00
AnyOldName3
f5a87ee46d Refactor out duplicated RTT setup code 2021-02-26 19:01:27 +00:00
AnyOldName3
153ab57ae3 Make assignment in while loop condition obviously intentional 2021-02-24 17:45:44 +00:00
AnyOldName3
2b144ff3dd Merge branch 'fix_frame_rate_limit' into 'master'
Fix frame rate limit (#5686)

See merge request OpenMW/openmw!603
2021-02-21 16:20:51 +00:00
AnyOldName3
9be258d260 Make it possible to reinstate FFP state easily 2021-02-19 19:59:48 +00:00
psi29a
5c0214142b Merge branch 'static-build' into 'master'
Optional local source builds of OSG, MyGUI, Bullet

See merge request OpenMW/openmw!547
2021-02-19 16:58:05 +00:00
psi29a
de28a89a43 Merge branch 'navigator_cleanup' into 'master'
Navigator cleanup

See merge request OpenMW/openmw!612
2021-02-19 16:37:45 +00:00
psi29a
59e09cba5b Merge branch 'boltsize' into 'master'
Use projectile mesh size (#5829)

See merge request OpenMW/openmw!587
2021-02-15 08:40:30 +00:00
elsid
561628087c Merge branch 'profiler_fix' into 'master'
Fix profiler glitches (#5850)

See merge request OpenMW/openmw!605
2021-02-15 00:01:06 +00:00
elsid
bc67669a97
Comment unused argument 2021-02-15 00:22:48 +01:00
elsid
4983684fda
Fix implicit int to float conversion warning 2021-02-15 00:20:15 +01:00
elsid
bb0c478954
Add missing include and use std malloc and free 2021-02-15 00:20:15 +01:00
elsid
3a9b1ce63a
Use camel case for local constant 2021-02-15 00:20:14 +01:00
elsid
a7fe6c7ba1
Move duplicated usage patter of dtNavMeshQuery::findNearestPoly into a separate function 2021-02-14 23:54:59 +01:00
elsid
d3ab6c972f
Avoid set unused position from dtNavMeshQuery::findNearestPoly result 2021-02-14 23:54:59 +01:00
AnyOldName3
4f510d85ba Merge remote-tracking branch 'upstream/master' into alpha-meddling 2021-02-14 22:42:55 +00:00
elsid
8dba61f7ae
Use navmesh raycast to find reachable position around target 2021-02-14 04:14:22 +01:00
fredzio
c4e909c29e Silence a clang warning:
warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
2021-02-12 19:36:03 +01:00
fredzio
bc4047d815 Update engine stats for all levels above first, not only at the second. 2021-02-12 19:03:02 +01:00
elsid
8ab5fd9b40
Fix frame rate limit
Measure time at the computation end but before sleep. This allows to adjust
sleep interval for the next frame in case sleep is not precise due to syscall
overhead or too low timer resolution.

Remove old frame limiting mechanism.
2021-02-12 00:03:11 +01:00
psi29a
c33b2e0100 Merge branch 'dehardcodebaseanim' into 'master'
Dehardcode Base_animation and improve Collada support

See merge request OpenMW/openmw!510
2021-02-10 16:29:47 +00:00
Sergey Fukanchik
f3271cb66b Add unit test for swapEndiannessInplace(). Part of Bug #5837 2021-02-09 13:09:36 -05:00
Petr Mikheev
31b5150e0d Fix implementation of Misc::swapEndiannessInplace 2021-02-07 09:12:38 +01:00
psi29a
dc31e1c680 Merge branch 'refraction_shadow_fix_2' into 'master'
Fix shadows missing in the refraction RTT on the first and second frame

See merge request OpenMW/openmw!590
2021-02-06 20:26:46 +00:00
AnyOldName3
3e273a759a Clarify method name now we're using it differently 2021-02-06 16:41:46 +00:00
fredzio
6e969ca3fa Use mesh collision box instead of node bounding sphere for projectile
size. The bounding sphere is much bigger than the mesh.
2021-02-05 22:53:45 +01:00
Alexei Dobrohotov
ab28847eaf Merge branch 'collisionextentsandcenter' into 'master'
Get collision box extents and center from btBvhTriangleMeshShape

See merge request OpenMW/openmw!579
2021-02-04 23:03:43 +00:00
unelsson
303f1912a6 less debug spam 2021-02-04 23:14:52 +02:00
unelsson
d5844b0982 Use accompanying txt file for textkeys in osgAnimation formats 2021-02-04 23:14:21 +02:00
elsid
68fe6b9114
Use only item size to check whether item fits cache
Item size has to be counted anyway and there is no reason to check only navmesh
data first.
2021-02-04 01:12:59 +01:00
elsid
3a2cea5271
Use raw recast mesh data and off mesh connections for navmesh key
Serialization into a vector of chars produces inconsistent results that leads
to reduced cache hit rate. Using a structured object is a more clear solution
and allows to remove serialization and nontrivial key compare logic with more
straigt forward structured object comparison.
2021-02-04 01:01:15 +01:00
elsid
ad1f8c1e84
Sort water and off mesh connections for recast mesh
Inconsisten order of these objects in navmesh cache key leads to cache misses
due to key inequality.
2021-02-04 01:00:41 +01:00
elsid
489107c5ee
Count navmesh cache key once in item size
Key is stored only in NavMeshTilesCache::Item, TileMap uses KeyView with
a pointer to a vector.
2021-02-04 00:44:23 +01:00
elsid
88ca4a1db6
Count navmesh cache hit rate 2021-02-04 00:35:24 +01:00
Nelsson Huotari
45fde84f4f Use nodemasks and visitors for detecting custom collision shapes 2021-02-03 21:16:54 +02:00
Nelsson Huotari
5c32460153 Add underscore-separated node-names to reserved-list 2021-02-03 14:25:50 +02:00
Nelsson Huotari
384112746c Add option for custom collision node with non-nif files 2021-02-03 14:25:09 +02:00
Nelsson Huotari
bae27e8199 dynamic_cast to static_cast 2021-02-02 21:52:15 +02:00
Nelsson Huotari
b28d8251aa Clone animation tracks 2021-02-02 21:52:08 +02:00
Nelsson Huotari
6c0c28c2eb Get collision box extents and center from btBvhTriangleMeshShape 2021-02-02 21:51:46 +02:00
Nelsson Huotari
1221889cf7 Limit conversion of underscores to nodes origating from osgAnimation library 2021-02-02 21:41:17 +02:00
Nelsson Huotari
5b88d16a50 Clean-up 2021-02-02 21:09:50 +02:00
Nelsson Huotari
2162b97fef Handle case in osgAnimation bone names 2021-02-02 17:34:02 +02:00
Nelsson Huotari
7d3f2bc113 Convert underscores in bone names to whitespaces 2021-02-02 17:33:40 +02:00
madsbuvi
7edaa50195 another approach 2021-01-31 18:02:05 +01:00
Nelsson Huotari
f87c45c92a Get collision box extents and center from btBvhTriangleMeshShape 2021-01-30 16:03:02 +02:00
Nelsson Huotari
3194520dcd Move base_anim settings to settings-default.cfg 2021-01-27 13:41:02 +02:00
Bret Curtis
b164f1aa17
Merge pull request #3023 from akortunov/grass_intsancing
Grass instancing
2021-01-27 12:21:24 +01:00
Frederic Chardon
7cd7fa2f08 Collect all available stats if OPENMW_OSG_STATS_FILE is set and point to
a valid file.
2021-01-27 08:04:33 +00:00
Gleb Mazovetskiy
99ba45a308 Optional static builds of OSG, MyGUI, Bullet 2021-01-26 19:00:55 +00:00
Andrei Kortunov
24e1dfcddc Use default argument 2021-01-26 22:29:41 +04:00
Andrei Kortunov
f40e227686 Remove redundant formatting changes 2021-01-26 22:29:41 +04:00
Andrei Kortunov
d12a0fdcb3 Mark only instances from groundcover files as groundcover objects 2021-01-26 22:29:41 +04:00
Andrei Kortunov
14cf0ce1dc Implement instanced groundcover 2021-01-26 22:29:41 +04:00
psi29a
49c828c138 Merge branch 'threadsafe-createchunk' into 'master'
Avoid OSG setting array binding from multiple threads

Closes #4765

See merge request OpenMW/openmw!557
2021-01-23 22:19:31 +00:00
Gleb Mazovetskiy
1e113710ef Clean-up FontLoader::loadFontFromXml fix
Follow-up to !559
2021-01-23 17:14:56 +00:00
Gleb Mazovetskiy
bd7d5a8f92 Fix memory leak in FontLoader::loadFontFromXml
Tried building with -DCMAKE_CXX_FLAGS='-fsanitize=address -fsanitize-recover=address'
and this was one of the reported leaks.
2021-01-23 04:08:39 +00:00
AnyOldName3
eb80c997b8 Avoid OSG setting array binding from multiple threads 2021-01-22 19:44:22 +00:00
Gleb Mazovetskiy
cd5e31dc4b Revert "Merge branch 'windowing-system' into 'master'"
This reverts merge request !541
2021-01-22 19:04:07 +00:00
AnyOldName3
b6e92c9c6d Use ShaderVisitor to skip translucent framebuffer specific stuff 2021-01-20 23:37:19 +00:00
psi29a
7455dfb3a1 Merge branch 'windowing-system' into 'master'
Fix OSG USE_GRAPHICSWINDOW check

See merge request OpenMW/openmw!541
2021-01-14 15:00:34 +00:00
Gleb Mazovetskiy
d24a5f7b89 Fix OSG USE_GRAPHICSWINDOW check
When OSG is built with `-DOSG_WINDOWING_SYSTEM=None`, this macro does not exist.

Replaces the Android-specific check with a general one.
2021-01-13 20:45:34 +00:00
Andrei Kortunov
89f3f860ed Allow to get a rotation vector from ESM::Position 2021-01-13 14:25:25 +04:00
Andrei Kortunov
f175beb304 Define template ref classes in components 2021-01-13 14:25:21 +04:00
psi29a
654238fd18 Merge branch 'no_bonus_points' into 'master'
Show mesh origin

Closes #5771

See merge request OpenMW/openmw!507
2021-01-11 21:21:47 +00:00
Petr Mikheev
eaaa2f4a1c Use misc/endianness.hpp in components/nif/nifstream 2021-01-10 16:34:47 +01:00
Petr Mikheev
14dd11372f Utility functions for little-endian <-> big-endian conversion. 2021-01-10 16:34:47 +01:00
Bret Curtis
a735bbe9a5
Merge pull request #3040 from akortunov/pvs
Fix some issues, found by PVS Studio
2021-01-10 12:58:17 +01:00
elsid
d2d8a7a940
Fix passing null to memcpy
/home/elsid/dev/openmw/components/detournavigator/navmeshtilescache.cpp:36:24: runtime error: null pointer passed as argument 2, which is declared to never be null
    #0 0x55e37ba4cda5 in makeNavMeshKey /home/elsid/dev/openmw/components/detournavigator/navmeshtilescache.cpp:36
    #1 0x55e37ba4cda5 in DetourNavigator::NavMeshTilesCache::set(osg::Vec3f const&, osg::Vec2i const&, DetourNavigator::RecastMesh const&, std::vector<DetourNavigator::OffMeshConnection, std::allocator<DetourNavigator::OffMeshConnection> > const&, DetourNavigator::NavMeshData&&) /home/elsid/dev/openmw/components/detournavigator/navmeshtilescache.cpp:81
    #2 0x55e37fe3c861 in DetourNavigator::updateNavMesh(osg::Vec3f const&, DetourNavigator::RecastMesh const*, osg::Vec2i const&, osg::Vec2i const&, std::vector<DetourNavigator::OffMeshConnection, std::allocator<DetourNavigator::OffMeshConnection> > const&, DetourNavigator::Settings const&, std::shared_ptr<Misc::ScopeGuarded<DetourNavigator::NavMeshCacheItem> > const&, DetourNavigator::NavMeshTilesCache&) /home/elsid/dev/openmw/components/detournavigator/makenavmesh.cpp:582
    #3 0x55e37fb796ce in DetourNavigator::AsyncNavMeshUpdater::processJob(DetourNavigator::AsyncNavMeshUpdater::Job const&) /home/elsid/dev/openmw/components/detournavigator/asyncnavmeshupdater.cpp:178
    #4 0x55e37fb9a125 in DetourNavigator::AsyncNavMeshUpdater::process() /home/elsid/dev/openmw/components/detournavigator/asyncnavmeshupdater.cpp:144
    #5 0x7f013f585c23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
    #6 0x7f013f8c63e8 in start_thread (/usr/lib/libpthread.so.0+0x93e8)
    #7 0x7f013e91d292 in __GI___clone (/usr/lib/libc.so.6+0x100292)
2021-01-09 22:59:24 +01:00
elsid
7b54415c40
Fix reference binding to null
/usr/include/c++/10.2.0/bits/stl_vector.h:1046:34: runtime error: reference binding to null pointer of type 'value_type'
    #0 0x55e37f50008a in std::vector<char, std::allocator<char> >::operator[](unsigned long) /usr/include/c++/10.2.0/bits/stl_vector.h:1046
    #1 0x55e37f50008a in ESM::SavedGame::load(ESM::ESMReader&) /home/elsid/dev/openmw/components/esm/savedgame.cpp:28
    #2 0x55e37e726139 in MWState::Character::addSlot(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/character.cpp:31
    #3 0x55e37e742b39 in MWState::Character::Character(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/character.cpp:88
    #4 0x55e37e7006e1 in MWState::CharacterManager::CharacterManager(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/charactermanager.cpp:25
    #5 0x55e37e6d4140 in MWState::StateManager::StateManager(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:90
    #6 0x55e37e82595a in OMW::Engine::prepareEngine(Settings::Manager&) /home/elsid/dev/openmw/apps/openmw/engine.cpp:641
    #7 0x55e37e8439fd in OMW::Engine::go() /home/elsid/dev/openmw/apps/openmw/engine.cpp:867
    #8 0x55e37e782760 in runApplication(int, char**) /home/elsid/dev/openmw/apps/openmw/main.cpp:289
    #9 0x55e37f6483c3 in wrapApplication(int (*)(int, char**), int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/components/debug/debugging.cpp:200
    #10 0x55e37ba8e3fe in main /home/elsid/dev/openmw/apps/openmw/main.cpp:301
    #11 0x7f013e845151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #12 0x55e37baa0e3d in _start (/home/elsid/dev/openmw/build/gcc/ubsan/openmw+0x6c11e3d)
2021-01-09 22:59:24 +01:00
Andrei Kortunov
8e5f26c109 Code cleanup 2021-01-09 14:41:10 +04:00
Andrei Kortunov
33648313a6 Initialize variables 2021-01-09 14:21:57 +04:00
Andrei Kortunov
7fc4c9f3f6 Avoid dead code 2021-01-09 13:52:01 +04:00
Andrei Kortunov
801e2d6ad0 Avoid to use uninitialized variables 2021-01-09 13:36:40 +04:00
AnyOldName3
4ed3252001 Check for EXT_gpu_shader4 CPU-side
Mesa lies and always defines GL_EXT_gpu_shader4 even when the extension
isn't present.
2021-01-07 18:13:51 +00:00
Alexei Dobrohotov
c17e498465 Merge branch 'launchercleanup' into 'master'
Remove deadcode from the launcher.

See merge request OpenMW/openmw!511
2021-01-03 08:48:52 +00:00
AnyOldName3
e3fd5efcfe Disable A2C for alpha-blended drawables 2021-01-02 19:09:06 +00:00
fredzio
dbdd397716 Remove deadcode. 2021-01-01 16:54:45 +01:00
Evil Eye
630ec36d1f iterate in reverse order 2020-12-30 10:35:51 +01:00
unknown
3bf641d3ce Show mesh origin 2020-12-29 21:45:59 +01:00
Andrei Kortunov
ee2416017e Fix tag mismatch 2020-12-28 12:19:22 +04:00
wareya
18ef32ca82 values for this higher than sGroundOffset cause jittering on some surface; use safe-seeming value slightly less than sGroundOffset 2020-12-27 22:16:11 +00:00
AnyOldName3
5e004356a2 Merge remote-tracking branch 'upstream/master' into alpha-meddling 2020-12-27 02:48:42 +00:00
AnyOldName3
8f4b856b44 Initial A2C implementation 2020-12-26 22:45:53 +00:00
AnyOldName3
8c3a786e54 Unconditionally disable alpha testing when shaders are used 2020-12-24 00:32:15 +00:00
AnyOldName3
11b4af49ce Allow shadowsbin to optimise clockwise-wound meshes when face culling is off 2020-12-23 01:24:15 +00:00