Commit Graph

449 Commits (master)

Author SHA1 Message Date
elsid cd3c3ebadb
Use VFS::Path::Normalized for ResourceManager cache key 10 months ago
elsid 84adb0a148
Make VFS::Path::Normalized constructor from std::string_view explicit 10 months ago
Evil Eye cef59e8928 Replace fixed size writeHNT calls with decomposition 10 months ago
AnyOldName3 02ef7ae3cc Give up rearranging the CS 10 months ago
AnyOldName3 36a75cdb29 Get the GLExtensions instance when a context is created 10 months ago
Mads Buvik Sandvei a94add741e Lua: Animation bindings 11 months ago
Andrei Kortunov 251d01304f Use move semantics for osg::ref_ptr 11 months ago
psi29a c23cd8e544 Merge branch 'umlautontherocks' into 'master'
Convert strings in nif files to utf8

Closes #7780

See merge request OpenMW/openmw!3783
11 months ago
Alexei Kotov e997c44db6 Restore unwrapped Bullet triangle shape shallow copying 11 months ago
Evil Eye 48db113149 Address feedback 12 months ago
Evil Eye 27fa411f4f Convert strings in nif files to utf8 12 months ago
Evil Eye 01eb333fad Merge branch 'generic_object_cache' into 'master'
Refactor GenericObjectCache and add unit tests

See merge request OpenMW/openmw!3689
1 year ago
elsid 7a817d3147
Apply project naming styleguide to GenericObjectCache 1 year ago
elsid 45b1b4f1e0
Remove redundant ObjectCacheMap alias 1 year ago
elsid 7b1ee2780b
Use ranged for loops in GenericObjectCache 1 year ago
elsid 2f0613c8d4
Remove user defined destructor for GenericObjectCache 1 year ago
elsid fd2fc63dd3
Support heterogeneous lookup in GenericObjectCache 1 year ago
elsid 56401a90a1
Merge GenericObjectCache update and remove functions
They are always called together. Single iteration over the items is more
efficient along with locking the mutex only once.
1 year ago
elsid 71e33cf8b2
Add unit tests for GenericObjectCache 1 year ago
Cody Glassman 187f63d3d3 support postprocess distortion 1 year ago
Alexei Kotov 754c5a8e2a Restore animated collision shape rescaling 1 year ago
elsid 08902371b4
Use settings values for Shaders settings 1 year ago
Alexei Kotov c800152ca2 Diminish error marker prominence
Don't render ESM4 actors or SpeedTree objects
1 year ago
Petr Mikheev c67b866a11 Replace `const ESM::RefNum&` -> `ESM::RefNum` 1 year ago
elsid 053a3caf7b
Pass cache expiry delay to GenericResourceManager constructor 1 year ago
elsid 915a8df942
Use struct for GenericObjectCache items 1 year ago
elsid 5f4bd498cf
Move cached value into container to be removed 1 year ago
elsid 52ab47771c
Initialize expiry delay for all GenericResourceManager instances 1 year ago
elsid 6d120f92e0
Lookup for terrain template using std::map::lower_bound instead of linear search 1 year ago
elsid b6a3d3c906
Make BaseResourceManager abstract 1 year ago
elsid 3202900fd3
Make GenericResourceManager::setExpiryDelay final 1 year ago
elsid 816d3772b9
Cache absent land object
This allows to save on lookup in store.
1 year ago
Andrei Kortunov 35561450f1 Do not copy osg::ref_ptr when possible 1 year ago
elsid dd54857610
Add missing array include 1 year ago
Evil Eye eeda48ec50 Drop support for --fs-strict 2 years ago
Evil Eye 9728024978 Replace compare with more idiomatic methods 2 years ago
Evil Eye 5491512905 Use string_view in more places and reduce the number of empty string literals 2 years ago
elsid 5ae8b9cae1
Report raw navmesh cache counters 2 years ago
elsid a8a76f9a05
Fix BulletShape copy constructor and use for BulletShapeInstance
Copy mVisualCollisionType.
2 years ago
jvoisin c7a3f43915 Minor header cleanup
This has been done via CLion's "unused include directive",
set to "detect completely unused".
2 years ago
unelsson 3d4da02b18 Don't mess around with btEmptyShape. Use nullptr instead. 2 years ago
unelsson 0a1af644af Make empty collision shape for objects without any triangles. 2 years ago
Shi Han a90e3b8c3b Move from std::atoi to std::from_char 2 years ago
Cédric Mocquillon f7b45a6262 Add method to load and clone the error marker used by the scene manager 2 years ago
Cédric Mocquillon 97c42768e6 Use the embedded marker error if we fail to load the error marker model from the vfs 2 years ago
elsid 02ada74fa1
Do not try to dereference nullptr in object cache 2 years ago
unelsson 5b0713517a Clang-format 2 years ago
unelsson ba9c2c9928 Add TemplateRef to animated Collada model 2 years ago
unelsson d60fd86719 clang format 2 years ago
unelsson c71504eeb0 Better comments 2 years ago
unelsson 4676ac4ac9 Cleaner code part 2 2 years ago
unelsson 960019cf65 Cleaner code 2 years ago
unelsson 2efc691736 clang format 2 years ago
unelsson 7ef6b3cb62 automatic clang format 2 years ago
unelsson d8de56e33c Coding style improvements, add Torso animation layer 2 years ago
unelsson ffc64205c5 Force collada animation layers, remove nif blend mask detection. 2 years ago
fteppe 125b21de20 Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID

Slowly going through all the changes to make, still hundreds of errors

a lot of functions/structures use std::string or stringview to designate an ID. So it takes time

Continues slowly replacing ids. There are technically more and more compilation errors

I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type

Continue moving forward, changes to the stores

slowly moving along

Starting to see the fruit of those changes.

still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.

More replacements. Things are starting to get easier

I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.

Still moving forward, and for the first time error count is going down!

Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably

Cells are back to using string for the name, haven't fixed everything yet. Many other changes

Under the bar of 400 compilation errors.

more good progress <100 compile errors!

More progress

Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string

some more progress on other fronts

Mostly game settings clean

one error opened a lot of other errors. Down to 18, but more will prbably appear

only link errors left??

Fixed link errors

OpenMW compiles, and launches, with some issues, but still!
2 years ago
Alexei Kotov cdd6a8c007 Merge branch 'models_for_the_model_god' into 'master'
Implement TestModels/T3D

Closes #7058

See merge request OpenMW/openmw!2506
2 years ago
AnyOldName3 66b8d4fb29 Add a setting to control coverage adjustment
With it on, which was always the case before this setting was added,
vanilla content and poorly-made mods will look acceptable, but well-made
mods will have alpha-tested meshes appear to grow and potentially gain a
weird outline as they get further away.

With it off, which replicates the 0.46 behaviour, well-made mods will
look really good, but vanilla content and poorly-made mods will have
alpha-tested meshes shrink as they get further away.

It's been bugging me that this was forced on since 0.47 released, and
I'd hoped to figure out a solution for automatic detection at some point
before 0.48 branched off, but I didn't, so now this is what we're
getting to have Tamriel Rebuilt look right.
2 years ago
Evil Eye b94818b24a Tweak message and temporarily set model ttl to 0 2 years ago
elsid 843753da14
Remove unused includes 2 years ago
jvoisin 3cbf1dc042 First pass with include-what-you-use 2 years ago
elsid 4de8ea30c8
Report used memory by Lua interpreter 2 years ago
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