Commit Graph

42 Commits (d3b623b5d32e8eba6c135ba62acfe049840040a4)

Author SHA1 Message Date
Bret Curtis f0b21cca22 use own inline hash_combine function 8 years ago
Bret Curtis 154d7cffa2 replace and purge boost::function 8 years ago
scrawl 34130fc5cc Fix handling in LightListCallback when the node is not a Group 8 years ago
scrawl b78a9f89af Refactor LightListCallback to allow for integration in custom Drawables. 8 years ago
scrawl 4aa40d16bc Increase the importance of light radius when sorting lights (Bug #2759) 8 years ago
scrawl 67e4a7e37b Change some osg::clone's to direct copy constructor to avoid dynamic_cast overhead 8 years ago
scrawl 839928e210 Fix light data being reset for the wrong light 8 years ago
scrawl c00532d82d Add LightStateCache to avoid redundantly setting the same gl_Light
Normally, osg::State would do this for us (via lastAppliedAttribute), but since we're using a custom StateAttribute to apply all lights at once, we have to track ourselves.

Further reduction of GL calls in a typical scene by ~2%
8 years ago
scrawl 4d4dc1b9c1 Add specialized DisableLight state attribute for more efficient undoing of light state
Seems to reduce # of GL calls by 10-15% in a typical scene.
8 years ago
scrawl 34deb6e7b1 Add 'showSceneGraph' command to export the scene or a particular object to .osgt for debugging purposes 8 years ago
MiroslavR 11565b5966 Make actors with non-portable lights in inventory glow (Closes #2042, #3338) 8 years ago
scrawl 174dd82894 Manually apply the osg::Light state
Reduce the amount of virtual function calls. Don't use the osg::Light's lightNum. Don't set spotlight state that we're not using (yet).
9 years ago
scrawl f898bf493f Don't use Geodes 9 years ago
scrawl 90a99991d1 Use empty() instead of !size() 9 years ago
scrawl 3e854a84a2 Slightly more efficient applying of light state 9 years ago
scrawl f93b7ec943 Fix light state issue
GLSL does not respect gl_Disable(GL_LIGHTX), so we have to set unused lights to zero.

Sadly, this change makes the applying of the modelView matrix less efficient. So far I couldn't find a better solution, osg's state tracker keeps getting in the way. :(
9 years ago
scrawl 9376811213 Vertex lighting shader 9 years ago
scrawl 93cc08a09c Lighting fix for LightListCallbacks attached to a Transform node 9 years ago
scrawl 438b30d6f0 Move configureLight to a separate file 9 years ago
scrawl 4a9b37aa53 Fix copy constructor issue 9 years ago
scrawl 8e9571d155 Double buffer the light StateAttributes and StateSets
Fixes a race condition where the position of a light could jump a frame ahead.
9 years ago
scrawl 1b77428c59 Use const reference, thanks ace13 9 years ago
scrawl fc7456e0a1 Explicitely opt for float matrices in performance critical places 9 years ago
scrawl 21e25f4756 Use the traversalNumber as frame number 9 years ago
scrawl 35459f20d5 Refactor lighting mask 9 years ago
scrawl c23609e22b Cache the light list in LightListCallback
When multiple cameras are rendering, the later cameras can reuse the light lists from the first camera.
9 years ago
scrawl 49df6b7450 LightManager: fix incorrect view matrix for RELATIVE_RF cameras 9 years ago
scrawl 6dff11f847 Duplicate code fix 9 years ago
scrawl 8552a9d82c Add multiple camera support to LightManager 9 years ago
scrawl b3f5ac5dbb Include cleanup 10 years ago
scrawl 631cec7304 Take the radius of lights into account when sorting 10 years ago
scrawl aad8e7b6d0 Light culling fix 10 years ago
scrawl 18f4eaa8dc Preliminary handling for overflowing light lists 10 years ago
scrawl acf9fc2d37 Enable per-frame light list updates (Bug #2638, Bug #2654)
The performance impact isn't so big anymore since the last commit.
10 years ago
scrawl 1d198a5592 Keep the light list StateSet cache for more than one frame 10 years ago
scrawl 5a7f2a4f1f Restore light attenuation settings 10 years ago
scrawl 3dcb167066 Map rendering 10 years ago
scrawl 8b768f4377 Minor fix for behaviour with non-existing LightManager 10 years ago
scrawl 987e923790 LightManager optimization 10 years ago
scrawl 61aaf0cf70 Attach light lists to the object base nodes instead of each renderable
Apparently that is how Ogre worked (on the SceneNode) so let's roll with it for now. Have not tested yet what MW does.
10 years ago
scrawl c92592493e OpenMW: create a window and render the starting cell(s) 10 years ago
scrawl 591a35b8d7 *very* early version of the LightManager 10 years ago