Kyle Cooley
b62cb0e2a4
Clear out GPU texture/stateset cache
2017-08-20 19:55:16 -04:00
Kyle Cooley
d7744e8b16
A bit of cleanup
2017-08-20 19:07:23 -04:00
Kyle Cooley
5950b26912
Update scene assets
2017-08-19 19:36:45 -04:00
Kyle Cooley
742bd00ec6
Clear cached resources
2017-08-19 15:26:46 -04:00
scrawl
be940656db
Add '0' as an alias for 'OFF' for OPENMW_OPTIMIZE
2017-07-10 23:49:42 +02:00
Bret Curtis
d785344fad
purge all instances of <boost/shared_ptr.hpp>, clean up unused headers
2017-06-09 19:08:53 +02:00
Ewan Higgs
38a2de3c51
convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis
2017-06-09 16:49:25 +02:00
Julian Ospald
5d85fa9220
Fix build with osg >= 3.5.6
2017-05-28 17:30:01 +02:00
scrawl
813af876f6
Use a partial binary search in isReservedName ( Fixes #3835 )
2017-05-07 23:28:56 +02:00
scrawl
f676b62711
Remove unused variable
2017-03-23 19:35:07 +01:00
scrawl
e7a0878c10
Add CompositeMapRenderer info to the stats panel
2017-03-14 19:27:56 +01:00
scrawl
051c17a184
Make reportStats const
2017-03-14 19:27:55 +01:00
scrawl
35d53acc65
Factor out terrain chunk loading/caching into a new resource manager
2017-03-14 19:27:55 +01:00
scrawl
9a3a64f0c4
Add resource manager for ESM::Land to allow data to be unloaded when no longer required
2017-03-14 19:27:55 +01:00
scrawl
4cd4457d21
Add support for Functors to ObjectCache
2017-03-14 19:27:55 +01:00
scrawl
9d72d9f0c9
Change order of operations in SceneManager::updateCache to allow deleting of StateSets that just got unreferenced by the scene
2017-03-14 19:27:55 +01:00
scrawl
928e2061f7
Remove redundant tolower
2017-03-13 02:48:23 +01:00
scrawl
5866f0f80b
Add OPENMW_OPTIMIZE env variable to help debugging optimizer-related issues
...
Example:
OPENMW_OPTIMIZE=OFF
OPENMW_OPTIMIZE="~FLATTEN_STATIC_TRANSFORMS"
2017-03-04 21:48:31 +01: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
4e0011bfc8
Improve NPC loading performance by caching the cleaned objectRoot
2017-03-01 03:00:49 +01:00
scrawl
585524805f
Add 'tri ' variant of part filters to optimizer ignore list
2017-02-25 21:48:07 +01:00
scrawl
75677f03e7
Remove SceneManager::notifyAttached
2017-02-24 02:58:41 +01:00
scrawl
3df7a8c4d8
Avoid FLATTEN_STATIC_TRANSFORMS optimization for non-Geometry drawables
2017-02-24 02:58:41 +01:00
scrawl
ebfd845eae
optimizer: run MERGE_GEOMETRY after removing redundant nodes
2017-02-23 23:28:50 +01:00
scrawl
e33829d493
Add fork of osgUtil::Optimizer with backported fixes that have not been released yet
...
Remove optimizers that won't be used.
2017-02-23 23:28:50 +01:00
scrawl
5e2335f250
Use the osgUtil::Optimizer post loading in the SceneManager
2017-02-23 23:28:50 +01:00
scrawl
d75a3fd0fb
Add SharedStateManager to the stats panel
2017-02-23 23:28:49 +01:00
scrawl
8f79fa3d72
Add resource statistics panel opened with F4
2017-02-22 14:28:45 +01:00
scrawl
3693f05ef5
Transform world-space particle systems in update callback so that animations are accounted for
2017-02-21 23:27:20 +01:00
scrawl
57b585570a
Preload magic effect visuals of the player's selected weapon/spell
2017-02-15 21:01:25 +01:00
scrawl
d141b98f0c
Add base animations to preloadCommonAssets
2017-02-09 03:32:40 +01:00
scrawl
c95868969b
Early out for scene graphs with no update callbacks in SceneManager::notifyAttached
2017-02-04 01:22:43 +01:00
scrawl
b4a6b6387b
Create own instance of osgDB::SharedStateManager so we control when to call prune()
...
prune() is now called in the background thread, just like the resource cache update.
Seems to improve performance by ~0.3 ms/frame
2017-02-03 03:27:12 +01:00
scrawl
e90941a8b3
Wrap the scene template reference in another object for const correctness and to avoid it from being serialized with the osgDB serializer
2017-02-01 06:00:14 +01:00
scrawl
5c94e2324f
Add missing use plugin macro for static build
2016-10-08 19:20:44 +02:00
scrawl
dda5bfbc9f
CharacterPreview no longer depends on osgViewer
2016-08-16 22:47:45 +02:00
scrawl
6f31b3d79f
Add parallax mapping for objects
2016-03-22 21:46:15 +01:00
scrawl
157c11398d
Add terrain parallax mapping
2016-03-22 21:46:15 +01:00
scrawl
24ae9f4ac1
Remove no longer needed apply(Geode&) in SetFilterSettingsVisitor and NodeToShapeVisitor
...
In OSG 3.4 (which is now a requirement), Drawables are normal Nodes attached in the scene graph. Geode is still provided for backwards compatibility, but does not need to be specially handled here because it now functions just like a normal Group node.
2016-03-14 00:38:22 +01:00
scrawl
e8caafa190
Remove no longer needed applyEffect(osgFX::Effect&) in SetFilterSettingsVisitor
...
No longer needed because terrain texture filtering is now updated manually in TerrainGrid::updateTextureFiltering.
2016-03-14 00:31:43 +01:00
scrawl
2eaf96e3bf
Make ResourceManager destructor virtual
2016-03-02 21:58:11 +01:00
scrawl
8bd16e4d5a
Don't compute the world matrix multiple times
2016-02-22 18:58:19 +01:00
scrawl
cee608e31b
Make it work with appveyor's outdated OSG build
2016-02-21 01:41:50 +01:00
scrawl
8e826eefe6
Add missing initialization
2016-02-21 01:26:45 +01:00
scrawl
cdefee3e64
Add call to MultiObjectCache::releaseGLObjects
2016-02-20 20:38:37 +01:00
scrawl
4ca6e91292
Fix in-code default settings so that we don't attempt to use shaders in OpenCS
2016-02-20 20:36:29 +01:00
scrawl
f01e8a6950
Add specular mapping for objects
2016-02-20 19:55:08 +01:00
scrawl
5cf2441b10
ShaderVisitor: support automatic recognition of normal maps based on file pattern
...
Introduce new settings 'auto use object normal maps', 'auto use terrain normal maps', 'normal map pattern'
2016-02-20 18:00:43 +01:00
scrawl
6000e48bba
Add terrain shaders and normal map support
...
Textures with _n filename suffix are automatically recognized as terrain normal maps.
2016-02-19 01:37:30 +01:00
scrawl
268594dcf1
Recreate shader in NpcAnimation::setAlpha
2016-02-18 22:48:53 +01:00
scrawl
a73512afb7
Add shader settings to settings.cfg
2016-02-18 19:38:34 +01:00
scrawl
a9ad1b09e2
Introduce ShaderManager & ShaderVisitor
...
Actual shaders still to be written.
2016-02-18 19:37:56 +01:00
scrawl
e05d975020
Change the way that texture filtering settings are applied at runtime
2016-02-18 19:37:55 +01:00
scrawl
c4d38bb42d
Fix clang analyzer warnings
2016-02-16 19:17:04 +01:00
scrawl
9eb96b9cb6
Parse the bullet version in FindBullet.cmake
2016-02-15 14:34:59 +01:00
scrawl
83a9a164bc
Raise the required bullet version to 2.83
...
2.82 appears to have a bug that causes the player to be able to phase through certain objects (bug #1587 ).
2016-02-15 00:33:17 +01:00
scrawl
5824619a95
Clean up includes
2016-02-12 19:28:10 +01:00
scrawl
8b596dfcbe
Remove support for OSG 3.2
...
Since commit e8662bea31
, we're using OSG functionality that contains an unfixed crash bug in version 3.2. The bug is fixed in version 3.4 (OSG commit 6351e5020371b0b72b300088a5c6772f58379b84)
2016-02-12 14:46:45 +01:00
scrawl
9f729667fb
Remove debug output
2016-02-09 21:16:11 +01:00
scrawl
0865cea211
Preload terrain
2016-02-09 21:16:11 +01:00
scrawl
246566cef4
Preload instances in BulletShapeManager
2016-02-09 18:48:49 +01:00
scrawl
e28dc3e72f
Preload instances in SceneManager
2016-02-09 18:35:26 +01:00
scrawl
2e62298bd3
Clean up ObjectCache includes
2016-02-09 18:11:07 +01:00
scrawl
e4e313fe12
Remove outdated comment
2016-02-08 14:41:21 +01:00
scrawl
c8054424c9
Preload items equipped by NPCs
2016-02-07 22:37:52 +01:00
scrawl
a81b10b415
Make the cache expiryDelay configurable
2016-02-07 19:05:55 +01:00
scrawl
41233fc8e5
Keep a reference to the original scene template for as long as the instance is used
2016-02-07 18:56:21 +01:00
scrawl
778bce3ae9
Remove unused ObjectCache functions
2016-02-07 18:27:12 +01:00
scrawl
49ecac4ced
Add a mutex lock around the SharedStateManager
2016-02-07 07:37:35 -08:00
scrawl
8b981ab507
Crash fix
2016-02-07 05:53:42 -08:00
scrawl
c155680d3c
Customize ObjectCache for more efficient locking in removeExpiredObjectsInCache
2016-02-07 00:43:37 +01:00
scrawl
d855a13b44
Clear the resource cache from the worker thread
2016-02-07 00:36:31 +01:00
scrawl
6f9ca0f68f
Add basic cell preloader class
...
Not properly in use yet, but seems to be working.
2016-02-07 00:14:13 +01:00
scrawl
e055ae094a
Improve const-correctness in BulletShapeManager
...
Sadly, two const_cast's are needed to work around Bullet API quirks.
2016-02-07 00:14:13 +01:00
scrawl
df57d4bfba
Use a common base class for resource managers
...
Implement updateCache to delete unreferenced cached objects when they have not been referenced for a while.
2016-02-06 17:22:17 +01:00
scrawl
ea1efaac0c
Use the osgDB::ObjectCache in SceneManager, cleanup
2016-02-06 00:15:12 +01:00
scrawl
909c4d96b6
Use the osgDB::ObjectCache in BulletShapeManager
2016-02-05 23:59:37 +01:00
scrawl
6c1c653cba
Use the osgDB::ObjectCache in ImageManager
...
Should be thread safe now.
2016-02-05 23:31:59 +01:00
scrawl
9e53e12c70
More renaming of TextureManager -> ImageManager
2016-02-05 23:10:27 +01:00
scrawl
5ee3d1698f
Remove getWarningTexture in favor of getWarningImage
2016-02-05 23:05:43 +01:00
scrawl
f99f403dda
Rename TextureManager to ImageManager
2016-02-05 23:03:53 +01:00
scrawl
6ef848b7c5
Remove TextureManager::getTexture2D
...
Instead use getImage and let the caller create the Texture. Sharing of textures is then handled in post by the SharedStateManager.
This is closer to what the OSG serializer does.
Streamlines the TextureManager and will make it easier to multithread.
2016-02-05 23:01:11 +01:00
scrawl
71401aafe7
Handle multipass techniques in SetFilterSettingsVisitor
2016-02-05 21:08:32 +01:00
scrawl
31988ca4cc
Add a dont_override_filter description for textures that should be left alone
2016-02-05 21:07:08 +01:00
scrawl
e8662bea31
Change the way that image origin is converted to OpenGL's lower-left convention
...
Flip the texture coordinates instead of flipping textures.
This simplifies the TextureManager (no need to worry if the caller wants flipping or not), should make it easier to generalize & multithread it.
2016-02-05 21:03:11 +01:00
scrawl
6ac688c0e2
Change the way that texture filtering setting changes are applied at runtime to not require keeping a reference to textures
...
The references would be difficult to clean up because there may or may not be another reference to the texture in the osgDB::SharedStateManager.
2016-02-05 21:03:11 +01:00
scrawl
5b972ee777
Move texture filtering settings to SceneManager
...
Practical benefits:
- Filter settings are now applied to native OSG format models. These models do not use TextureManager::getTexture2D since the model itself specifies a Texture.
- The GUI render manager will be able to use its own separate textures, making it easier to turn off filtering for them.
2016-02-05 21:03:10 +01:00
scrawl
d9290b0ee0
Array fix
2016-01-25 21:13:38 +01:00
scrawl
48f53e23bf
Allow alternate mesh formats for marker_error
2016-01-25 17:15:54 +01:00
Tobias Kortkamp
0659687bfb
Some fixes for building on FreeBSD
2016-01-25 14:13:16 +01:00
Alexander "Ace" Olofsson
0efb8e2949
osgDB::ObjectCache was added in 3.3.3, not 3.4.0
...
Fixes redefinition error on builds with OSG >3.3.3 <3.4.0
2015-12-24 17:18:32 +01:00
scrawl
c70790ecb7
Remove outdated comment
2015-12-14 15:50:30 +01:00
scrawl
076dc539bc
KeyframeManager fix
2015-12-14 15:11:06 +01:00
Chris Robinson
f1faeeae3a
Use separate config options for min and mag texture filters
2015-12-13 17:05:19 -08:00
Chris Robinson
5c0a847eaf
Combine some duplicate code
2015-12-13 16:51:27 -08:00
scrawl
64424e7262
Move keyframe loading out of SceneManager to new KeyframeManager
2015-12-13 15:31:07 +01:00
scrawl
295563ba65
Minor fix
2015-12-13 15:31:07 +01:00
scrawl
9d4af59860
Don't attempt to create quest log buttons if textures are unavailable ( Fixes #3063 )
2015-12-07 15:33:04 +01:00
scrawl
87e44bf627
Small fix
2015-12-02 15:21:13 +01:00
scrawl
d3fa8a8602
Add osgDB::ObjectCache to the repository to work around it not being available in OSG 3.2
2015-12-02 15:14:39 +01:00
scrawl
3d12b2ca9d
Add NifFileManager to avoid duplicate parsing of the NIFFile in SceneManager and BulletShapeManager.
2015-12-02 14:59:32 +01:00
scrawl
e49bce7b40
Share the bvh of btBvhTriangleMeshShape's when possible
...
Results in decent cell-loading speed up. (only affects bullet versions < 2.83, since we use btScaledBvhTriangleMeshShape for >=2.83)
2015-11-30 02:06:29 +01:00
scrawl
fc7456e0a1
Explicitely opt for float matrices in performance critical places
2015-11-22 19:54:27 +01:00
scrawl
ffea9ec2c4
Remove comment
...
SharedStateManager::prune is run automatically during the update traversal.
2015-11-22 19:54:26 +01:00
scrawl
d68ea994d5
Deal with empty meshes
2015-11-17 01:51:21 +01:00
scrawl
83e9a649e5
Cleanup
2015-11-17 01:45:38 +01:00
scrawl
e62470d674
Auto-generate the collision shape for native mesh formats
2015-11-17 00:20:15 +01:00
scrawl
8cf57ef6ac
Move BulletShapeManager and BulletShape to resource/
2015-11-17 00:20:15 +01:00
scrawl
eb2f16d682
Support for loading .osg mesh format
2015-11-16 23:26:43 +01:00
scrawl
0409e5a043
Use OSG_VERSION_GREATER_EQUAL / LESS_THAN rather than MIN_VERSION_REQUIRED (cosmetic change)
2015-11-10 18:28:58 +01:00
scrawl
f1ac408f35
Place Drawables directly in the scene graph when built with OSG 3.4
...
OSG 3.4 adds the ability to place Drawables directly in the scene graph, without a Geode decorating them. Leveraging this should give a small performance boost, because the redundant Geodes increase culling overhead.
There is still an oustanding issue with the RemoveDrawableVisitor no longer working correctly, because Drawables can have multiple parents.
2015-11-10 18:23:42 +01:00
scrawl
91583fc027
Fix MWRender::Mask_ParticleSystem
2015-11-10 17:00:33 +01:00
scrawl
af3b0cd883
Improve some error messages
2015-08-21 00:31:43 +02:00
Alexander "Ace" Olofsson
1f78ebd3c9
Oops?
2015-07-30 12:22:51 +02:00
Alexander "Ace" Olofsson
77a3a52b4e
What's wrong with this statement?
2015-07-30 12:16:15 +02:00
Alexander "Ace" Olofsson
e9ffbcc1b0
OSG 3.3.3 moves GL extensions out of osg::Texture
2015-07-30 11:45:10 +02:00
scrawl
d7ad0ee148
Print a sensible error message when S3TC support is missing ( Fixes #2800 )
2015-07-28 23:35:10 +02:00
scrawl
26656707dd
Use marker_error.nif as replacement when a mesh fails to load
2015-07-28 03:21:44 +02:00
Marc Zinnschlag
edde1fb727
Merge remote-tracking branch 'scrawl/master'
2015-07-18 11:40:36 +02:00
slothlife
1b3cc957f8
Move some OSG static library setup code
2015-07-17 15:13:43 -05:00
slothlife
df99d5a59d
Move setup code for OSG when statically linked
2015-07-17 09:56:21 -05:00
slothlife
83ef1f7eea
Add support for linking OpenSceneGraph statically
...
Added some basic support for linking to OpenSceneGraph and its plugins
statically. Also added a library necessary to statically link MyGUI
(previously Ogre pulled it in).
2015-07-17 00:56:15 -05:00
scrawl
c4866bdfc6
Disable mipmaps for GUI textures
...
For some reason, the mipmap generator seems to be broken on Linux Intel graphics (works on Nvidia). This was breaking the scrollbar arrows, which are minified enough to show using a mipmap.
2015-07-13 19:13:26 +02:00
scrawl
efad4efe19
Star fading (Bug #2693 )
2015-06-19 20:55:04 +02:00
scrawl
43384596d4
Style fix
2015-06-18 01:26:10 +02:00
scrawl
fabc5126f3
Include cleanup
2015-06-18 00:30:51 +02:00
scrawl
b648722d3b
Don't use the ParticleSystem for computing placeable bounds (Bug #2700 )
2015-06-17 15:13:41 +02:00
scrawl
6199c0bbc5
Use osgDB::SharedStateManager for sharing of StateSets across NIF files
2015-06-16 23:50:19 +02:00
scrawl
8d6620b074
Assign an initial bounding box to particle systems
2015-06-11 02:37:49 +02:00
scrawl
bd0233ce68
Error handling improvement
2015-06-03 18:00:34 +02:00
scrawl
7f9f9a32d2
InitWorldSpaceParticles fix
2015-06-01 16:29:42 +02:00
scrawl
723beb1cac
Move IncrementalCompileOperation to SceneManager
2015-05-26 20:20:18 +02:00
scrawl
24bb2e152c
Apply texture filter setting changes
2015-05-14 21:42:04 +02:00
scrawl
af7cbb2e3b
Leak fix
2015-05-08 17:52:35 +02:00
scrawl
140e67036c
Flip non-dds textures vertically
...
Fixes the up-side down loading screens.
2015-05-03 17:10:50 +02:00
scrawl
1a5407af98
Reduce texture memory usage in OpenMW
2015-05-02 19:36:36 +02:00
scrawl
1b78acc2c0
Remove manual allocation for images
2015-05-02 18:06:17 +02:00
scrawl
083c41c950
Environment map for enchanted objects
2015-04-17 01:23:37 +02:00
scrawl
5dd1ab24fe
More efficient StateSetController, beginnings of sky rendering
2015-04-14 15:58:16 +02:00
scrawl
74c56556cc
More fixes for scaled particle systems
2015-04-05 14:10:31 +02:00
scrawl
e5e1013c51
TextKeys attached to root node as user data, add .kf loading to scenemanager
2015-04-02 17:34:44 +02:00
scrawl
232e34bddd
OpenCS: port lighting toolbar, fix multiple context GL objects issue
2015-03-28 20:15:17 +01:00
scrawl
c5fd92fde1
Show a default warning texture for not found textures
2015-03-28 02:58:04 +01:00
scrawl
bb32c761df
*very* early texture manager, need a lot more thought to design this properly
2015-03-28 02:27:59 +01:00
scrawl
322fcdc2d3
Transform world space particles when attaching to a node
2015-03-28 00:30:49 +01:00
scrawl
99e1720980
Add SceneManager and clone utility
2015-03-26 18:02:51 +01:00