Commit Graph

150 Commits (openmw-38)

Author SHA1 Message Date
scrawl daa94cc50e Fix cppcheck warnings 9 years ago
scrawl 723c392a73 NifLoader: fall back to the first UV set when encountering invalid UV set references 9 years ago
scrawl 0731595c2b Wrap a Texture2D in a ref_ptr 9 years ago
scrawl 31c3324705 Don't assume the emitter node is a Group (Fixes #3082)
This would be a correct assumption by default, but is no longer true when the NifLoader::optimize() function optimizes the graph.
9 years ago
scrawl 64424e7262 Move keyframe loading out of SceneManager to new KeyframeManager 9 years ago
scrawl e3d3380c8c Remove return value for in-place toLowerStr 9 years ago
scrawl 1d5af3c9c8 Remove unneeded cast 9 years ago
scrawl e39f49a88f OSG extensions namespace fixes 9 years ago
scrawl a29aef14f1 Eliminate a dynamic_cast in ParticleSystemController 9 years ago
scrawl 6cf2c35235 Don't rely on the _particles vector implementation details
This will allow compiling OpenMW with an osgParticle optimization to be pushed to OpenMW/osg.
9 years ago
scrawl c9d710f334 Use a typedef to avoid conditional compiling 9 years ago
Alexander "Ace" Olofsson cfcbd20d99 Let's put it as a MSVC-only fix for now 9 years ago
Alexander "Ace" Olofsson e42f4999bd Quick fix for building on MSVC 9 years ago
scrawl e5ec4fe042 Add const specifier 9 years ago
scrawl 695fcf41c4 Optimize ValueInterpolator / KeyframeController
Cache the current position in the animation track and attempt to reuse it in the next frame.

Decent speed up for the Update phase, about 0.3 ms faster in Balmora.
9 years ago
scrawl ac366f1603 Fix the rig bounds being updated twice per frame
Unlike what I expected, the osgUtil::UpdateVisitor is set to traverse all children (not only active children). The FrameSwitch was thus traversing both RigGeometries part of the double-buffering scheme, rather than only the one active in the current frame.
9 years ago
scrawl 38510a56c2 GeomMorpherController: do not dirty the MorphGeometry unless necessary 9 years ago
scrawl 0d49c7fa51 GeomMorpherController: fix double update of MorphGeometry 9 years ago
scrawl 28b20428b9 Remove dynamic_cast in GeomMorpherController 9 years ago
scrawl fc7456e0a1 Explicitely opt for float matrices in performance critical places 9 years ago
scrawl 36e91617c9 Revert "NifOsg::Emitter: ignore psToWorld scale"
This reverts commit 7c16630874.

Fixes #3022
9 years ago
scrawl 9b96fcc224 Set the particle scaleReferenceFrame to local space 9 years ago
scrawl 21e25f4756 Use the traversalNumber as frame number 9 years ago
scrawl 7c16630874 NifOsg::Emitter: ignore psToWorld scale
Seems wrong to me, but MW appears to do it that way. Without this fix, the light_de_candle_08_64 from http://www.nexusmods.com/morrowind/mods/41654/ has flame particles in the wrong spot.
9 years ago
scrawl 0965a9059d Handle NiLODNode using osg::LOD (Fixes #3008) 9 years ago
scrawl 1edcb219a7 Leak fix 9 years ago
scrawl fc93dc6195 Remove a stray method declaration 9 years ago
scrawl 0409e5a043 Use OSG_VERSION_GREATER_EQUAL / LESS_THAN rather than MIN_VERSION_REQUIRED (cosmetic change) 9 years ago
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.
9 years ago
scrawl bd8332d2b0 Remove default copyop argument for nodecallback copy constructors
Works around a compiler warning with OSG 3.4:

warning: base class 'class osg::Callback' should be explicitly initialized in the copy constructor [-Wextra]

With no default argument for osg::CopyOp&, the compiler no longer sees the function as a real copy constructor and stops warning about the missing virtual initializations.

We don't care about this warning because there is nothing interesting to initialize in the osg::NodeCallback base anyway.

A proper fix for the warning would require to inserting OSG_VERSION conditional compiling all over the place, that is as long as we are still supporting OSG 3.2.
9 years ago
scrawl 64abdbabe3 Small refactor of controllers handling, print warning messages for unhandled controllers 9 years ago
scrawl 35f5be680b Support for NiVisController on trishape nodes 9 years ago
scrawl 2ee6b41887 Handle NiAlphaProperty on a drawable basis
Removes the RenderBin nesting complication. Also results in leaner StateSets, so the cull phase should be a bit faster.
9 years ago
scrawl 8e69c80bf6 Add framenumber checks in various cull callbacks, so we don't update more than once per frame when multiple cameras are used 9 years ago
scrawl 76fb68a9c0 Handle particle systems that don't have emitters
Fixes a crash in the Magic Diversity mod.
9 years ago
scrawl 16b8ef3164 Don't use a shared Material in MaterialColorController 10 years ago
scrawl de479e35c8 Fix AlphaController affecting all instances of the StateSet 10 years ago
Arthur Moore 2d93a6f6cb Be more verbose when dealing with unhandled nif texture properties 10 years ago
scrawl ac1f64b559 Fix StencilProperty front face mixup (Fixes #2802) 10 years ago
scrawl 24ae1d5ace Fix some issues found by coverity 10 years ago
scrawl bf9c62fa42 Fix for some coverity scan defects 10 years ago
scrawl 7a5f220ac5 GlowTexture keeps the alpha channel from the previous texture stage 10 years ago
scrawl 39539603bf Re-enable a warning message 10 years ago
scrawl a7c5beb7c5 Remove redundant allocations for NIF meshes 10 years ago
scrawl 81a4a6da6b Make better use of the available texture units (Bug #2702)
Nvidia drivers only support a maximum of 4 fixed function texture units. To resolve this problem, bind texture units in order instead of binding to the NiTexturingProperty::TextureType unit.
10 years ago
scrawl 934166a853 Ignore the alpha value for particle materials (Bug #2699) 10 years ago
scrawl d7a4a9fd66 Create NIF root nodes as Group instead of Transform when possible 10 years ago
scrawl b79ab1a3b8 Fix InverseWorldMatrix bug introduced by last commit 10 years ago
scrawl ec25f1da95 Fix ParticleSystem bug introduced by last commit 10 years ago
scrawl ad46ff7a98 Remove redundant Transform nodes for TriShapes/ParticleSystems with an identity transform 10 years ago