Commit Graph

336 Commits (d2d1036d265650d3ed9110a4abfdb581c159804f)

Author SHA1 Message Date
elsid c338c1e5d3
Add Nif::FileView as read only interface for Nif::NIFFile
To make sure interface is scoped to what users require.
2 years ago
elsid f2fb3d6de8
Separate NIFFileReader from NIFFile
NIFFile might not always be created from a file or stream containing NIF data.
Basically there are 2 different responsibilities for this class:
1. Read NIF file
2. Provide input for nifosg and bulletnifloader.

Remove no longer needed NIFFileMock since the state of NIFFfile can be
initialized independently from reading NIF file.
2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
elsid ac01fd5e75
Add missing non-prefixed reserved nodes 2 years ago
elsid 8068d0153f
Initialize reserved names once to avoid race condition
CanOptimizeCallback::isReservedName function may be executed by multiple threads
simultaneously. One of them creates a static but both of them run if statement
and see it's empty because none of them added elements there yet. Both of them
go to the branch where new elements are added doing it without any
synchronization possibly causing SIGSEGV.
2 years ago
elsid 409f83a149
Use raw string literal for error marker definition 2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
elsid e9be8b5efe
Show stats for writing and reading navmesh db queue jobs 2 years ago
elsid 948e2f5db9
Do not use collision shapes with visual only collision to generate navmesh
These collision shapes are not used for actors movement physics simulation.
2 years ago
elsid cc8c7002ea
Cleanup components includes 2 years ago
elsid f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2 years ago
elsid ba69146ced
Use std::string_view to avoid redundant std::string construction 2 years ago
elsid 0614b82452
Restore UnrefQueue to destruct animation asynchronously 2 years ago
Andrei Kortunov c36c28e8f9 Move NIF implementation to cpp files 2 years ago
Andrei Kortunov dc0d6fe31d Avoid code duplication 2 years ago
Andrei Kortunov facdc8fc0d Use string_view 2 years ago
Andrei Kortunov d83382d236 Rework Profiler to work with VFS 2 years ago
Andrei Kortunov 59c4ea014d Rework StatsHandler to support VFS 2 years ago
Andrei Kortunov 6f6b5ba04b Some refactoring 2 years ago
Andrei Kortunov dd04bfccfb Load fonts 2 years ago
Andrei Kortunov d3da09878d Drop line about non-existent UnrefQueue 3 years ago
glassmancody.info a0265ffb89 only enable soft particles when enabled in settings 3 years ago
glassmancody.info b09411d396 allow soft particles on meshes and add extra data extensions 3 years ago
psi29a feef257584 Merge branch 'postprocessor-stereo' into 'master'
[Postprocessing] Stereo integration

See merge request OpenMW/openmw!1988
3 years ago
Mads Buvik Sandvei b0e4c7e76a [Postprocessing] Stereo integration 3 years ago
Nelsson Huotari 334c6dde0b custom class for osgAnimation::RigGeometry, Collada animated deforming body parts 3 years ago
elsid 3affe9913f
Limit the number of simultaneously open not actively used content files
Use LRU cache for ESMReaders. When cache capacity is reached close least
recently used ESMReader. Remember the file name if a reader was open. Once the
reader requested again open the file if there is stored name for it. Put
released ESMReader to the back of the free items list. Close ESMReader's from
the front of the free items list.

Cached item can be used only by one client at the same time. If the same item is
requested twice exception is thrown. This should never happen in practice. If
this happens need to fix the client logic.

It's allowed to go over the capacity limit when requesting different readers.
Ideally this should never happen but there will be system error anyway
signalizing about too many open files. Need to fix client logic in this case.

All places that were using a vector of ESMReaders now using the cache. Cache is
local for each use case and there is no need for a thread safety.
3 years ago
Evil Eye a95b6e050a Replace new with make_unique in components 3 years ago
cody glassman ac6089a430 skip flipping of 3D textures which is unsupported in OSG 3 years ago
cody glassman 04843fed6d moddable post-processing pipeline 3 years ago
Evil Eye a64979e25d Replace empty std::string assignments 3 years ago
fredzio d05a2facf3 Handle NCC flag in Nif files. Objects with this flag will collide only with camera.
Expose objects with NC flag to be used by Lua mods.
3 years ago
elsid e7f3524924
Add a tool to load and print information about all bullet objects in all cells 3 years ago
Cody Glassman 9cafc31c0d Restore ripples with soft particles 3 years ago
jvoisin 1a6be08149 Fix "warning: loop variable is copied but only used as const reference;... 3 years ago
Petr Mikheev 7fe5351f55 Fix compilation error on windows: cannot convert from 'std::filesystem::path'... 3 years ago
Petr Mikheev b06248a31f Fix #6502 3 years ago
elsid 96eb8d7be9
Write generated navmesh to navmeshdb
Perform all request to db in a single thread to avoid blocking navmesh
generator threads due to slow write operations.

Write to db navmesh for all changes except update as it done for memory cache.

Batch multiple db operations into a single transaction to speed up writing by
not executing fsync after each insert/update query. All reads are performed in
the same transaction so they see uncommited data.
3 years ago
elsid a665a38aca
Use MurmurHash3_x64_128 for file hash 3 years ago
Cody Glassman d85f772269 Depth refactor 3 years ago
Cédric Mocquillon 40656b3135 Embed error marker in osgt format inside a string defined in misc/errorMarker.hpp.
Use the embed error marker we fail to load a mesh.
3 years ago
psi29a 41bd20e358 Merge branch 'bullet_shape_hash' into 'master'
Store BulletShape source file name and content hash

See merge request OpenMW/openmw!1379
3 years ago
elsid d7041613ef
Store BulletShape source file name and content hash 3 years ago
Alexei Dobrohotov 9880c43c86 Add specular strength shader parameter 3 years ago
psi29a 5836d0225f Merge branch 'leave_butter_to_soften' into 'master'
Soft Particles (#6128)

See merge request OpenMW/openmw!980
3 years ago
Bo Svensson 1960e976e2
refactors stringops.hpp (#3192)
With this PR we refactor `StringUtils::replaceAll` to accept `string_view` as suggested in a code comment. In addition, while we are touching this rebuild happy file, we slim it down a bit by moving a few sparingly used functions elsewhere.
3 years ago
glassmancody.info 8c3b00164e soft particles 3 years ago
elsid b731a981c4
Make BulletShape::isAnimated inlined 3 years ago
elsid c83facd9d3
Avoid redundant osg::ref_ptr<const BulletShape> copy 3 years ago